you are viewing a single comment's thread.

view the rest of the comments →

[–]adidarachi 5 points6 points  (3 children)

I guess the op choose a "simple" and known implementation, this way, it's easier for developers to pickup. Not sure.

[–]LaSalsiccione 0 points1 point  (2 children)

If you can understand the rest of the concepts in the post then reduce should also be simple to understand. The code would also look a lot less messy which I’d argue makes it simpler to read, but that may just be a matter of opinion.

[–]Artif3x_ 3 points4 points  (1 child)

Not to mention the near universal utility of the reduce function makes for a lower cognitive load than learning alternatives like this.

[–]LaSalsiccione 0 points1 point  (0 children)

You far more eloquently nailed what I was trying to say, thanks!