Updates values based on map function.
npm install @extra-array/mapUpdates values based on map function.
:package:
:smiley_cat:
:running:
:vhs:
:moon:
:scroll:
:newspaper:
:blue_book:
> Alternatives: [map], [map$].
> Similar: [map], [filter], [reject], [reduce], [accumulate].
> This is part of package [extra-array].
[extra-array]: https://www.npmjs.com/package/extra-array
``javascript`
array.map(x, fm);
// x: an array
// fm: map function (v, i, x)
`javascript
const array = require("extra-array");
var x = [1, 2, 3, 4];
array.map(x, v => v * 2);
// [ 2, 4, 6, 8 ]
``
- Data.List.map: Haskell
- Array.prototype.map: MDN web docs
- array_map: PHP
- Array.map: sugarjs
- filter-collection: @dimd13
[map]: https://github.com/nodef/extra-array/wiki/map
[map$]: https://github.com/nodef/extra-array/wiki/map$
[filter]: https://github.com/nodef/extra-array/wiki/filter
[reduce]: https://github.com/nodef/extra-array/wiki/reduce
[accumulate]: https://github.com/nodef/extra-array/wiki/accumulate
[reject]: https://github.com/nodef/extra-array/wiki/reject