paint-brush
Meet the Holy Trinity of Functional Programming: Map, Filter, and Reduceby@mlevkov
730 reads
730 reads

Meet the Holy Trinity of Functional Programming: Map, Filter, and Reduce

by Mikhael LevkovskyAugust 18th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

For loops are for suckers (well not really), higher order functions are all the rage and you want to understand what this means. Map, Filter and Reduce are the 3 most popular methods. It's important to understand how and when to use these methods, but more importantly, you also need to know when to avoid them. The map function goes through every single element of an array and applies a passed in function to each element. If you have a huge collection that takes up a lot of memory, maybe using a good old fashion for loop is better.
featured image - Meet the Holy Trinity of Functional Programming: Map, Filter, and Reduce
Mikhael Levkovsky HackerNoon profile picture
Mikhael Levkovsky

Mikhael Levkovsky

@mlevkov

L O A D I N G
. . . comments & more!

About Author

Mikhael Levkovsky HackerNoon profile picture
Mikhael Levkovsky@mlevkov

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite