Comment by layer8
14 hours ago
It reduces n items to one item, recursively. The items don’t have to have the same type. Arguably accumulate is a more fitting name. I think of “reduce” as in cooking, boiling a volume of stuff down to some essence.
I also agree that a for loop is often clearer.
No comments yet
Contribute on Hacker News ↗