← Back to context

Comment by elgertam

9 hours ago

The only part of "hard to read" that has ever made sense is that the callback takes multiple args and sometimes I can't remember the order of the initial value versus the accumulator.

Incidentally, reduce is also powerful enough to implement both map and filter in terms of itself, though that's more of a teaching exercise than a good recommendation.

I mostly interpret it as of the same spirit with those who oppose proper tail calls because it "ruins" their debugging stack traces.