-
Notifications
You must be signed in to change notification settings - Fork 1
set
wolfram77 edited this page Mar 27, 2020
·
24 revisions
Sets value at index (+ve, -ve).
iterable.set(x, i, v);
// x: an iterable
// i: index (-ve: from right)
// v: value
// --> set iterable
const iterable = require('extra-iterable');
var x = [2, 4, 6, 8];
iterable.set(x, 1, -4);
// [2, -4, 6, 8]
iterable.set(x, -1, -8);
// [2, 4, 6, -8]