A lazy list implementation with generator and iterator
npm i @nodew/lazylist
tree src ->
src
├── index.ts
├── generators.ts
├── operators.ts
├── wrap.ts
├── reusable.ts
├── utils.ts
└── classic.ts
some basic generators such as repeat、cycle、range and so on.
operators on series, map/filter/take/drop/zip...
helper function for cache evaluated values, while native iterator only do next
by next
until done is true, you can't re-call it from begin at next time.
wrap operators and generators up, the return value is reusable.
classic infinite list implementations, such as fibonacci and primes.