4 ms·
> fold, inject, reduce What's up with all these aliases? Isn't one name enough?
by perfunctory 15y ago
> fold, inject, reduce
What's up with all these aliases? Isn't one name enough?
- kitcambridge 15y agoMost of the additional aliases are taken directly from Ruby's `Enumerable` module (though both `fold` and `reduce` are common names for that function; not sure why Ruby called it `inject`), but I definitely agree. One name should be sufficient, especially with the availability of the API documentation.