
11 Feb
2005
11 Feb
'05
5:08 a.m.
ajb@spamcop.net wrote:
Note that "currying" applies to operator sections too. The idiom of "pipelined functions" deserves its own special mention:
countlines = length . lines
But this is really a shorthand for:
countlines cs = length . lines $ cs
an interesting use of $ (in conjunction with another infix). I usually write: countlines cs = length $ lines cs or more general f = g . h . i becomes f x = g $ h $ i x Christian