-
Notifications
You must be signed in to change notification settings - Fork 1
drop$
Subhajit Sahu edited this page Dec 2, 2022
·
15 revisions
Remove first n values (default order).
function drop$(x, n)
// x: a set (updated)
// n: number of values [1]
const set = require('extra-set');
var x = new Set([1, 2, 3, 4, 5]);
set.drop$(x, 2);
// → Set(3) { 3, 4, 5 }
x;
// → Set(3) { 3, 4, 5 }
var x = new Set([1, 2, 3, 4, 5]);
set.drop$(x, 3);
// → Set(2) { 4, 5 }