0.2.0 • Published 1 year ago

ts-lazy-lib v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

ts-lazy-lib

CI Status npm License

Реализация ленивых вычислений в typescript

Install

yarn add ts-lazy-lib # Or alternatively: `npm install ts-lazy-lib`

Usage

Пример использования

import { lazy, unlazy, take, range, foldr, map } from 'ts-lazy-lib'

...
const list = take(lazy(100000), range(lazy(10)));
const lazyValue = foldr((a, b) => a + ', ' + b, lazy('!'), map(v => String(v), list));
console.log(unlazy(lazyValue));

Будет выведено:

10, 11, ..., 100008, 100009, !

Testing

yarn test # Or alternatively: `npm test`

See Also

License

The MIT License. See the license file for details.

0.2.0

1 year ago

0.2.0-dev.1

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago