logoalt Hacker News

layer8today at 1:52 AM0 repliesview on HN

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.