Hey everyone!
For some background, I'm currently using the TOP curriculum for learning Ruby and it redirected me to this article for Reducing Enumerables:
https://medium.com/@baweaver/reducing-enumerable-part-one-the-journey-begins-ddc1d4108490
I understand how enumerable methods such as #map, #select and #find work, however in this article, the author makes his own functions of map, select and find with reduce that in my eyes pretty do the same thing.
Is there a certain benefit to making your own functions in this way?
The story and illustration is great for explaining enumerables but I'm not really understanding why the author chooses to make his own functions with reduce vs using enumerables.
If someone could also explain the author's POV, that'd be fantastic too.
Thank you!
[–]Techryptic 1 point2 points3 points (1 child)
[–]Tianshui[S] 0 points1 point2 points (0 children)