
Mon, 28 May 2001 10:23:58 +0100, Malcolm Wallace
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 * qrczak@knm.org.pl http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTÊPCZA QRCZAK

Marcin Kowalczyk:
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.
Hmmm. An experimental syntax, you say... Oh, say, you reinvented FORTH? (No args in parentheses there, a function taking something at its right simply *knows* that there is something there). Jerzy Karczmarczuk Caen, France
participants (2)
-
Jerzy Karczmarczuk
-
Marcin 'Qrczak' Kowalczyk