Recently, I was involved in a thread on Twitter, where I mentioned that I also, at one time, found Array reduce challenging to wrap my head around....
For further actions, you may consider blocking this person and/or reporting abuse
I feel I have the potential to be an excellent developer but am not sure what steps to take next to become a Jedi, right now the force is weak with me. Can I get some references to good collaborative open source development I would appreciate this kind people.
Thanks for this simple article on reduce! I have a suggestion for changing the map method to a more performant version. Would love to see an article on rxjs's scan method!
The performance of this map is n^2 because we are returning a new copied array inside the reducer method. Isn't this unnecessary immutability? Because we control the initial empty array state, we could mutate this array inside the reducer and still benefit from mutability for the caller of the map method.
Instead of this
We could do this -
The beauty of reduce is, it's always pure by default.
I call this rendition "Everything is Reduce" 😁
github.com/vanillaes/absurdum
But when I say "reduce", I mean more like "reduction" in cooking.
I love that quote!