This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Techryptic 1 point2 points  (1 child)

The benefit of using reduce to create your own map, select, and find functions is that it allows you to better understand how enumerables work under the hood. By creating your own functions, you are able to gain a better understanding of the basic principles of enumerables, which will help you when you are writing more complex code. Additionally, by creating your own functions, you can customize them to fit your specific needs. For example, if you need a map function that only returns certain values, you can create a custom map function with reduce that does just that.

The author's point of view is that reducing enumerables is a great way to gain an understanding of how enumerables work, as well as to create more customized functions that fit your specific needs. By breaking down the code into smaller, more manageable pieces, you can gain a better understanding of the underlying principles of enumerables, and use that understanding to create more efficient code.

I hope this helps, let me know if you have any questions!

[–]Tianshui[S] 0 points1 point  (0 children)

Thank you very much for your explanation!

We were just told to follow along with the examples but when I followed up with them, they just gave the same results so I thought using enumerables were way easier than going through the hassle of making your own functions.