Okay, I agree that adding it to the List library would be a bad choice :) All the objections you raise are really good, and I think adding more functions is not solving the problem of having some unfamiliar ones.
Jeff, I would write it that way too :) Though novice-me would probably try it in one line first, see that it is tough to understand, then break it apart. I wonder if there is a way to make an "imperative feeling" library though. You can rewrite map and fold to look like this:
-- general purpose looping function
for : (f -> [a] -> b) -> [a] -> f -> b
-- do something to each element
each : (a -> b) -> [a] -> [b]
-- accumulate some result
accumulate : b -> (a -> b -> b) -> [a] -> b
for each [ 1.. 9 ] <| \i ->
i^2
for (accumulate 0) [ 1 .. 9 ] \i total ->
total + i
I don't really know if there is some pedagogical value to doing something like this. I can definitely see how it could be extra confusing. But this is more about the fact that this is possible :)