[Haskell-cafe] Point-free style

Lennart Augustsson lennart at augustsson.net
Mon Feb 14 09:55:01 EST 2005


Daniel Fischer wrote:
> And could one define
> 
> \f g h x y -> f (g x) (h y)
> 
> point-free?
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


More information about the Haskell-Cafe mailing list