-
Notifications
You must be signed in to change notification settings - Fork 1
remove$
Subhajit Sahu edited this page Dec 2, 2022
·
15 revisions
Delete a value from set.
function remove$(x, v)
// x: a set (updated)
// v: value
const set = require('extra-set');
var x = new Set([2, 4, 6, 8]);
set.remove$(x, 4);
// → Set(3) { 2, 6, 8 }
x;
// → Set(3) { 2, 6, 8 }
var x = new Set([2, 4, 6, 8]);
set.remove$(x, 8);
// → Set(3) { 2, 4, 6 }