-
Notifications
You must be signed in to change notification settings - Fork 1
size
Subhajit Sahu edited this page Feb 3, 2021
·
21 revisions
Find the length of an iterable.
Similar: index, indexRange, size, isEmpty.
function length(x, i, I)
// x: an iterable
// i: start index [0]
// I: end index [END]
const xiterable = require('extra-iterable');
var x = [2, 4, 6, 8];
xiterable.length(x);
// → 4
xiterable.length(x, 1);
// → 3
xiterable.length(x, 1, 3);
// → 2