
13 Feb
2012
13 Feb
'12
11:10 a.m.
On Mon, Feb 13, 2012 at 8:41 AM, John Meacham
On Mon, Feb 13, 2012 at 12:07 AM, AntC
wrote: So the advantage of dot from that point of view is: * dot already appears tightly-bound in qualified names * dot is already a reserved operator, so we won't have to search for some other candidate
(.) is not a reserved op, it is defined and redefinable like every other operator and has no special fixity rules.
main = do let x . y = x + y print (3 . 8)
prints 11 like you would expect.
Oddly enough, I have occasionally wanted (.) to bind tighter than function application but still be composition. map toUpper.chr xs has a nice feel to me :)
To that I say: let f = drop 1 . filter odd . take 30 in f xs -- :) -- Ben