Skip to content
Subhajit Sahu edited this page Dec 28, 2022 · 17 revisions

Transform values of entries.

Similar: map, reduce, filter, filterAt, reject, rejectAt.


function map(x, fm)
// x:  ilists
// fm: map function (v, k, x)
const xilists = require('extra-ilists');

var x = [['a', 'b', 'c', 'd'], [1, 2, 3, 4]];
xilists.map(x, v => v * 2);
// → [ [ 'a', 'b', 'c', 'd' ], [ 2, 4, 6, 8 ] ]


References

Clone this wiki locally