[Haskell-cafe] flip dot
garious at gmail.com
Wed Sep 27 20:33:48 EDT 2006
Since there's talk of removal of the composition operator in
how about this:
foo = f . g
foo = .g.f
A leading dot would mean, "apply all unnamed parameters to the function on
the right". A trailing dot would mean, "apply the result of the left to the
function on the right".
Prelude> notNull = .null.not
=> [a] -> Bool
I like this because it has the same perks as the composition operator, yet
it looks like OO code and the data flows nicely from left to right. It
reads especially well when using the bind operator on the same line.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe