Skip to content
Subhajit Sahu edited this page Feb 3, 2021 · 15 revisions

Removes first n values. 🏃 📼 📦 🌔 📒

Alternatives: drop, drop$.
Similar: take, drop.

set.drop$(x, [n]);
// x: a set (updated)
// n: number of values (1)
// --> x
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 }

references

Clone this wiki locally