Skip to content
Subhajit Sahu edited this page Feb 2, 2021 · 27 revisions

Updates values based on map function. 🏃 📼 📦 🌔 📒

Alternatives: map, map$.
Similar: map, filter, reject, reduce, accumulate.


array.map$(x, fm);
// x:  an array (updated)
// fm: map function (v, i, x)
// --> x
const array = require("extra-array");

var x = [1, 2, 3, 4];
array.map$(x, v => v * 2);
// [ 2, 4, 6, 8 ]

x;
// [ 2, 4, 6, 8 ]


References

Clone this wiki locally