1.0.0 • Published 12 years ago
iota-array v1.0.0
iota-array
Fills an array with sequential integers. Just like C++'s std::iota() or the similarly named function in APL.
Install
npm install iota-arrayExample
console.log(require("iota-array")(3))
//Prints:
//
// [0,1,2]
//require("iota-array")(n)
Constructs an array of length n of n sequential integers starting from 0.
nthe length of the array to construct
Returns: An array of n sequential integers starting at 0
Credits
(c) 2013 Mikola Lysenko. MIT License