Re:Currying vs. Partial Application (2015)
by splintercell on Thursday September 21, 2017 @11:35AM
(#15304493)
In my experience, there is almost never a need for creating a loop on an array purely for the sake of side effect.
For instance, if you want to write something on the log, then loop and collect everything into a single array (using map) and then perform the side effect with a single command (which is a lot more performant in most cases).
For asynchronous side effects, create an array of promises using a map, and then run a Promise.all() on that array if you need to resolve all of them.
But again, if your experience is different or in your requirements, it is not possible to create a map/reduce/filter transoformation for side effects, then I'd love to hear about it.
+1 for including take/drop alongside map/reduse/filter