If we want to map a function that increases every element of a range by 1, we could write
map (\\x -> x + 1) [1..5]
but I guess most peo
I think map (\x -> x - 1) [1..5] transmits the programmer's intention better, since there's no doubt about what is being subtracted from what. I also find your first solution, map (+(-1)) [1..5], easy to read too.
map (\x -> x - 1) [1..5]
map (+(-1)) [1..5]