Array.prototype.mapOn method

dante federici c.dante.federici at gmail.com
Fri Oct 27 17:11:51 UTC 2017


I'd be -1 on adding something like this to the language. This is better
solved with a library.

Transducers are a much better general solution than by stacking or adding
special array functions. You don't want to solve the "map with filter"
case, since there are many, many more combinations (take after map, filter
on map, group with map, etc.).

Some details on transducers:
https://clojure.org/reference/transducers
https://github.com/cognitect-labs/transducers-js
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20171027/942141f8/attachment.html>


More information about the es-discuss mailing list