[Haskell-cafe] Point-free style

Peter G. Hancock hancock at spamcop.net
Mon Feb 14 11:00:21 EST 2005

>>>>> Lennart Augustsson wrote (on Mon, 14 Feb 2005 at 14:55):
    > 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. :)

It sometimes surprises me the prelude doesn't have 

  diag f x = f x x

(aka W.  It already has B, C, K and I: (.), flip, const and id.)

Peter Hancock

More information about the Haskell-Cafe mailing list