
10 Feb
2005
10 Feb
'05
2:50 p.m.
incrEach' i is = is >>= \i' -> return (i'+i)
Ugh, but I think the natural way to write it looks more like
incrAll :: Integer -> [Integer] -> [Integer] incrAll n ks = map (+n) ks
which is no less readable than map . (+).
I tend to like point-freeing only the last argument, which gives something like:
incrAll n = map (+n)
which I think (personally) is the most readable. -- Hal Daume III | hdaume@isi.edu "Arrest this man, he talks in maths." | www.isi.edu/~hdaume