
10 Feb
2005
10 Feb
'05
10:53 a.m.
Jan-Willem Maessen writes:
Is it really clear or obvious what
map . (+)
means?
Yes, it is perfectly obvious once you write it like this: incrEach :: Integer -> [Integer] -> [Integer] incrEach = map . (+) Now compare that to the following function, which does the some thing but without point-free notation: incrEach' :: Integer -> [Integer] -> [Integer] incrEach' i is = is >>= \i' -> return (i'+i) Which one is harder to read? ;-) Peter