fp-ts bindings for `Iterable` types, allowing for programming lazy and infinite lists.
fp-ts bindings for Iterable types, allowing for programming lazy and infinite lists.
This could (soon) be used as a drop in replacement for the module fp-ts/ReadonlyArray
``shnpm
npm install fp-ts-iterable
Documentation
Please visit the documentation for the API surface.
Upcoming
- Structures
-
IterableTask for interop with AsyncIterator
- NonemptyIterable
- NonempyIterableTaskRecommendations
$3
- If coersing from something like a
ReadonlyArray, it's recommended to coerce it to an Iterable using FromReadonlyArray.
- There is no performance benefit, but it could alleviate bugs before they happen.$3
- All functions using the word
Right in their names require buffering all values so it knows where the end is.
- If the Iterable is large or infinite, it may cause an out of memory error.
Ensure infinite iterables end by using a skip combinator that does not contain the word Right.$3
-
AsyncIterable is Iterable, but should be coerced to Iterable via FromAsyncIterable`