-
Notifications
You must be signed in to change notification settings - Fork 1
getAll
Subhajit Sahu edited this page Feb 3, 2021
·
26 revisions
Get values at indices.
function getAll(x, is)
// x: an iterable
// is: indices (sorted)
const xiterable = require('extra-iterable');
var x = [2, 4, 6, 8];
[...xiterable.getAll(x, [1, 2])];
// → [4, 6]
[...xiterable.getAll(x, [1, 3])];
// → [4, 8]