[Haskell-cafe] Re: Point-free style
fruehr at willamette.edu
Thu Feb 10 20:29:10 EST 2005
Jerzy pointed out the utility (well, at least the *possibility*) of
expressions such as the following when writing points-free code (or
perhaps per Matthew it should be "pointy code" :) ):
(.) . (.) . (.)
This is the function which composes a 1-argument function with a
3-argument function (and the pattern generalizes to n in the second
functional argument). I sometimes itch to use the n=2 case, as in the
following, but good sense usually gets the better of me:
(.<) = (.) . (.)
(this allows, for example, concat .< replicate).
One gets the impression of some odd kind of Morse code, or perhaps
"smileys" / "emoticons" ...
The attached file gives some more detail and examples for the
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1200 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20050210/6d232694/Comp.bin
More information about the Haskell-Cafe