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

Henning Thielemann lemming at henning-thielemann.de
Mon Feb 6 08:12:55 EST 2006


On Sun, 5 Feb 2006, Tomasz Zielonka wrote:

> On Sun, Feb 05, 2006 at 01:14:42PM -0000, Brian Hulley wrote:
>
> > This is similar to how people often format lists:
> >
> >     a =
> >          [ first
> >          , second
> >          , third
> >          ]
>
> I am one of those people, and I am slightly annoyed with I have to
> add something at the beginning of the list.

In this case I prefer the non-sugar variant:

a =
    first :
    second :
    third :
    []




More information about the Haskell-Cafe mailing list