← Back to context

Comment by jay_kyburz

9 hours ago

Yeah, but you never _need_ reduce. You can just have a boring loop.

I like boring code.

Not in Elixir. Unless you use tail recursion to simulate the loop. I love reduce and the other functions of the Enum module, so I have 165 calls to reduce in my code base (plus 338 map and 116 filter). It's the swiss army knife of functional programming and I don't see any problem with its usage.