| ▲ | Skeime 6 hours ago | |
I think this is because in an imperative language, `reduce` does not actually give you much over a `for item in collection` loop. With `map` and `filter`, you immediately learn something about the result (it's a list of the same length as the original, with each item only depending on the corresponding original item; it's a list containing some of the original elements unchanged and nothing else). This is useful, so `map` and `filter` are good. With `reduce`, the result could be anything, and in an imperative language, side effects are also possible. So it's just a loop with worse syntax. (Admittedly, in an imperative language, `map` and `filter` could also have side effects, though I think most people would consider this bad style.) | ||