[Haskell-cafe] Exercise in point free-style

Julien Oster haskell at lists.julien-oster.de
Fri Sep 1 20:55:02 EDT 2006


Julien Oster wrote:

>   = ((.) (filter f)) . map  g l
>   = (.)((.) . filter f)(map)  g l	-- desugaring
>   = (.map)((.) . filter f)  g l		-- sweeten up
>   = (.map) . (.) . filter  g l		-- definition of (.)

By the way, I think from now on, when doing point-free-ifying, my
philosophy will be:

If it involves composing a composition, don't do it.

I just think that this really messes up readability.

Cheers,
Julien



More information about the Haskell-Cafe mailing list