On Mon, Feb 14, 2005 at 03:55:01PM +0100, Lennart Augustsson wrote: > Any definition can be made point free if you have a > complete combinator base at your disposal, e.g., S and K. > > Haskell has K (called const), but lacks S. S could be > defined as > spread f g x = f x (g x) > > Given that large set of Haskell prelude functions I would > not be surprised if spread could already be defined point > free in Haskell. :) > > -- Lennart
I hope this won't be considered cheating... import Control.Monad.Reader k :: a -> b -> a k = return s :: (a -> r -> b) -> (a -> r) -> a -> b s = flip (>>=) . flip Greetings, Remi -- Nobody can be exactly like me. Even I have trouble doing it. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
