UNPKG
@prelude/array
Version:
latest (3.0.0)
3.0.0
2.3.1
2.3.0
2.2.0
2.1.0
2.0.0
1.0.0
0.3.2
0.3.1
0.3.0
0.2.0
0.1.2
0.1.1
0.1.0
0.0.1
Array module.
@prelude/array
/
mjs
/
indices.js
10 lines
•
244 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
/**
@returns
array with 0 to n-1 indices. */
const
indices
= (
n
) => {
const
array =
new
Array
(n);
for
(
let
i =
0
; i < n; i++) { array[i] = i; }
return
array; };
export
default
indices;
//# sourceMappingURL=indices.js.map