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