Skip to content
Subhajit Sahu edited this page May 11, 2020 · 26 revisions

Gets value at indices. 🏃 📼 📦 🌔 📒

Alternatives: one, all.

iterable.getAll(x, is);
// x:  an iterable
// is: indices (sorted)
// --> ...values
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 ]

references

Clone this wiki locally