-
Notifications
You must be signed in to change notification settings - Fork 1
left
Subhajit Sahu edited this page Feb 3, 2021
·
18 revisions
Get values from left.
function left(x, n)
// x: an iterable
// n: number of values
const xiterable = require('extra-iterable');
var x = [1, 2, 3];
[...xiterable.left(x, 1)];
// → [1]
[...xiterable.left(x, 2)];
// → [1, 2]