infinitelist

0.0.1 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i infinitelist

Weekly Downloads

1

Version

0.0.1

License

GPLv2

Last publish

Collaborators

  • champii