Keeps values at given indices only.
Alternatives: filter, filter$, filterAt.
Similar: map, filter, reject, reduce, accumulate.
This is part of package extra-array.
This is browserified, minified version of @extra-array/filter-at.
It is exported as global variable array_filterAt.
CDN: unpkg, jsDelivr.
array.filterAt(x, is);
// x: an array (updated)
// is: indices (sorted)
// → x
const array = require("extra-array");
var x = [2, 4, 6, 8];
array.filterAt(x, [1, 2]);
// [ 4, 6 ]
array.filterAt(x, [1, 3]);
// [ 4, 8 ]