
1 Apr
2008
1 Apr
'08
4:31 p.m.
Think about this:
map (+1) [1..10]
What should it do? take (+1) and return a function which takes a list as its argument and finally return a list.
How about:
f 1 2 3
Should that be f (1 (2 3)), or ((f 1) 2) 3? The latter, of course, but that's not really what I'm driving at. I'm asking why we can't have a function treated differently with regard to the precedence and associativity rules. f 1 2 is indeed ((f 1) 2). Why not f 1 g 2 == ((f 1) (g 2))?
Cheers, Paul