-
Notifications
You must be signed in to change notification settings - Fork 1
set
Subhajit Sahu edited this page May 9, 2020
·
24 revisions
iterable.set(x, i, v);
// x: an iterable
// i: index
// v: value
const iterable = require('extra-iterable');
var x = [2, 4, 6, 8];
[...iterable.set(x, 1, -4)];
// [2, -4, 6, 8]
[...iterable.set(x, 3, -8)];
// [2, 4, 6, -8]