-
Notifications
You must be signed in to change notification settings - Fork 1
rejectAt
Subhajit Sahu edited this page Feb 3, 2021
·
10 revisions
Discards the values at given indices. 🏃 📼 📦 🌔 📒
Alternatives: reject, [rejectAt].
Similar: map, filter, reject, reduce, accumulate.
iterable.rejectAt(x, is);
// x: an iterable
// is: indices
const iterable = require("extra-iterable");
var x = [2, 4, 6, 8];
[...iterable.rejectAt(x, [1, 2])];
// [ 2, 8 ]
[...iterable.rejectAt(x, [1, 3])];
// [ 2, 6 ]