-
Notifications
You must be signed in to change notification settings - Fork 1
getAll
Subhajit Sahu edited this page May 19, 2020
·
26 revisions
Gets values at indices. 🏃 📼 📦 🌔 📒
Alternatives: [get], [getAll].
Similar: [get], [set].
iterable.getAll(x, is);
// x: an iterable
// is: indices (sorted)
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 ]