There was an error while loading. Please reload this page.
Transform values of a map.
Alternatives: map, map$. Similar: map, reduce, filter, filterAt, reject, rejectAt.
function map$(x, fm) // x: a map (updated) // fm: map function (v, k, x)
const map = require('extra-map'); var x = new Map([['a', 1], ['b', 2], ['c', 3], ['d', 4]]); map.map$(x, v => v * 2); // → Map(4) { 'a' => 2, 'b' => 4, 'c' => 6, 'd' => 8 } x; // → Map(4) { 'a' => 2, 'b' => 4, 'c' => 6, 'd' => 8 }