-
Notifications
You must be signed in to change notification settings - Fork 5
map$
Subhajit Sahu edited this page Mar 14, 2020
·
27 revisions
Updates values based on map function.
array.map$(x, fn, [ths]);
// x: an array (updated)
// fn: map function (v, i, x)
// ths: this argument
// --> x
const array = require('extra-array');
var a = [1, 2, 3, 4];
array.map$(a, v => v * 2);
// [2, 4, 6, 8]
a;
// [2, 4, 6, 8]