3 ms·
It's a "when in Rome..." situation. Theres nothing wrong with using them but what you are going to find across the community are comprehensions. They concisely
by leetrout 3y ago
It's a "when in Rome..." situation.
Theres nothing wrong with using them but what you are going to find across the community are comprehensions. They concisely bring the data container and the iteration together with no fuss.
If you need to map and reduce and filter and want to build a chain and/or have reusable predicate functions then go for it.
I always encourage my teams to reach for the ecosystem usage before doing things because another language does it different (map/filter/reduce being the best option in JS 90% of the time).
But maybe you work at a functional shop and everyone Gets It(tm) and then it is the norm.