by rtpg · 11y ago · 0 comments
foldl (+) 0 (map (+2) [1..10])
or sum $ map (+2) [1..10]
So... make up your own mind.As someone who has written only small chunks of lisp but at many different points in life, I do find the whole parens game to be a bit disorienting, but usually I can counter it by using newlines.
I would write something like
(reduce + (map (comp inc inc) (range 10)))
as (reduce +
(map (comp inc inc)
(range 10))) sum $ map (+2) [0..9]
Nitpick, but it confused me for a second.