Infinite List in JS similar to Haskell's InfList
Platform | Build Status |
---|---|
Linux | |
Windows |
NPM
npm i endless-js
CDN
<script style="https://cdn.jsdelivr.net/npm/endless-js/dist/index.min.js"></script>
Endless behaves similarly to a normal Array instance. The only difference is that Endless can only be constructed given a function that produces values.
const example = new Endless(x => x); // [0, 1, 2, 3, 4, 5, ...]
You can set/get through brackets notation:
example[0] = 100;
example[0]; // 100
Online documentation available at the Official endless.js docs site
Clone the repo first, then run:
npm install
To build:
npm run build