infinitelist
v0.0.1
Published
infinite sequence list
Downloads
3
Readme
InfiniteList
Infinite Sequence List in Javascript
Under developement
/!\ This library use ES6 generators, your node binary must use --harmony flag /!\
Usage
List = require \infinitelist
list = new List 0 (+ 2)
console.log list.get 5 # 10
console.log list # [0, 2, 4, 6, 8, 10]
API
new List(startValue, iterator)
Iterator is a function of the following form :
(prev, i) ->
With prev
the last element in the list, and i
the current generating index.