[Haskell-cafe] Those damned parentheses

Andrew Butterfield andrew.butterfield at cs.tcd.ie
Tue May 10 09:47:27 CEST 2011


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 at 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/
--------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110510/d0ec0295/attachment.htm>


More information about the Haskell-Cafe mailing list