[Haskell-cafe] Those damned parentheses

Yitzchak Gale gale at sefer.org
Tue May 10 10:10:37 CEST 2011

Andrew Butterfield wrote:
>> Why not indeed ?

Roel van Dijk wrote:
> import Control.Category ( (>>>) )
> f = Main.id >>> show >>> (++ " - message received") >>> putStrLn

Indeed, I agree. I sometimes do that, too, when I want to
emphasize the idea of "applying tools one after the other".

But most often I just use traditional "function composition"
notation. That reminds us of the connection with mathematical
functions. It also raises less eyebrows when other people read
my code - some people immediately panic when they see an
import from Control.Category or Control.Arrow. :)


More information about the Haskell-Cafe mailing list