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

Tomasz Zielonka tomasz.zielonka at gmail.com
Sun Feb 5 09:32:06 EST 2006


On Sun, Feb 05, 2006 at 01:14:42PM -0000, Brian Hulley wrote:
> How about:
> 
>      f x y
>      . g x
>      $ z
> 
> then you only need to add the line
> 
>      . h x y

But then you have a problem when you when you want to add something
at the beginning ;-) With right-assoc $ adding at both ends is OK.

> 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. I even went so far that
when I had a list of lists, which were concatenated, I've put an
empty list at front:

    concat $
        [ []
        , [...]
        , [...]
        .
        .
        .
        ]

Best regards
Tomasz

-- 
I am searching for programmers who are good at least in
(Haskell || ML) && (Linux || FreeBSD || math)
for work in Warsaw, Poland


More information about the Haskell-Cafe mailing list