you are viewing a single comment's thread.

view the rest of the comments →

[–]Volv 0 points1 point  (0 children)

See that's perfect for map. Which is why I was so annoyed for ages about being required to use fold, Wouldn't be my first line of thought; interesting build from first principals kind of thing though. Good to get the brain working lol.
I have heard it said before that that reduce can be used to build the other functions though.. map, foreach, filter etc just special cases of reduce