[Haskell-cafe] Point-free style

Lennart Augustsson lennart at augustsson.net
Mon Feb 14 10:46:17 EST 2005


Remi Turk wrote:
> import Control.Monad.Reader
> 
> k :: a -> b -> a
> k = return
> 
> s :: (a -> r -> b) -> (a -> r) -> a -> b
> s = flip (>>=) . flip
> 
> Greetings,
> Remi
> 

Oh, a little bit of cheating.  ;)   But neat.

It can be done without importing anything.
(Except the implicit Prelude import, of course.)

     -- Lennart


More information about the Haskell-Cafe mailing list