
On 10 May 2011, at 08:30, Yitzchak Gale wrote:
If I were to describe to someone in words what this function does, I would say something like: "Apply Main.id, turn it into a string, tack a message onto the end, and print it." So why not write it that way in Haskell?
Why not indeed ? (-->) = flip (.) f = Main.id --> show --> (++ " = message received") --> putStrLn ;-)
One of the nicest features of Haskell is that the combinator approach is often so natural.
:-) :-)
Regards, Yitz
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------------------------------------------------------------- Andrew Butterfield Tel: +353-1-896-2517 Fax: +353-1-677-2204 Foundations and Methods Research Group Director. School of Computer Science and Statistics, Room F.13, O'Reilly Institute, Trinity College, University of Dublin http://www.cs.tcd.ie/Andrew.Butterfield/ --------------------------------------------------------------------