-
Notifications
You must be signed in to change notification settings - Fork 1
set$
Subhajit Sahu edited this page May 9, 2020
·
17 revisions
map.set$(x, k, v);
// x: a map (updated)
// k: key
// v: value
// --> x
const map = require('extra-map');
var x = new Map([['A', 1], ['B', 2]]);
map.set$(x, 'A', -1);
// Map(2) { 'A' => -1, 'B' => 2 }
x;
// Map(2) { 'A' => -1, 'B' => 2 }
map.set$(x, 'B', -2);
// Map(2) { 'A' => -1, 'B' => -2 }