[Haskell-cafe] Point-free style
Thomas Jäger
thjaeger at gmail.com
Mon Feb 14 11:08:22 EST 2005
On Mon, 14 Feb 2005 16:46:17 +0100, Lennart Augustsson
<lennart at augustsson.net> wrote:
> Remi Turk wrote:
> > import Control.Monad.Reader
> >
> > k :: a -> b -> a
> > k = return
> >
> > s :: (a -> r -> b) -> (a -> r) -> a -> b
> > s = flip (>>=) . flip
This can be even written as s = ap.
> It can be done without importing anything.
> (Except the implicit Prelude import, of course.)
It can, but is it possible to do it much easier than
> s' = flip flip (span ((0 ==) . fst) . zip [0..] . repeat) . ((.) .) . (id .) . (uncurry .) .
> flip ((.) . flip (.) . (. (snd . head))) . (. (snd . head))
?
Thomas
More information about the Haskell-Cafe
mailing list