[Haskell-cafe] Why is $ right associative instead ofleftassociative?

Lennart Augustsson lennart at augustsson.net
Sun Feb 5 10:45:50 EST 2006


John Hughes wrote:
> What, no list comprehensions??

No.  I think the do notation is good enough.


> 
> I'd disagree--sequencing is special, and lists represent it directly.
> Don't forget, also, that lists are also much more prevalent in beginners'
> code--and nice notation for beginners helps get people started on
> Haskell.

I don't really see what's so much better about writing
[x1,x2,x3,x4,x5] than x1:x2:x3:x4:x5:[].
When I've explained lists to beginners I've just found it
annoying and hard to explain why there are two ways of
writing lists.  And why only lists have this special syntax.

	-- Lennart



More information about the Haskell-Cafe mailing list