Mon, 28 May 2001 10:23:58 +0100, Malcolm Wallace <[EMAIL PROTECTED]> pisze:

> It seems that right-associativity is so intuitive that even the
> person proposing it doesn't get it right.  :-)

And even those who correct them :-)

>> f x (foldr1 f xs)                    f x foldr1 f xs
> 
> Wouldn't the rhs actually mean f x (foldr1 (f xs)) in current notation?

No: f (x (foldr1 (f xs)))

Basically Haskell's style uses curried functions, so it's essential
to be able to apply a function to multiple parameters without a number
of nested parentheses.

BTW, before I knew Haskell I exprimented with a syntax in which 'x f'
is the application of 'f' to 'x', and 'x f g' means '(x f) g'. Other
arguments can also be on the right, but in this case with parentheses,
e.g. 'x f (y)' is a function f applied to two arguments.

-- 
 __("<  Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK


_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to