docs/polyethylene.md
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [polyethylene](./polyethylene.md)
## polyethylene package
A library for working with iterables and async iterables in a functional style, by transforming the iterations on the fly and getting results from them.
## Remarks
The entry point for this library is the [Poly](./polyethylene.poly.md) namespace, and the main iterable classes are [PolySyncIterable](./polyethylene.polysynciterable.md) and
## Classes
| Class | Description |
| --- | --- |
| [AsyncIterableBuilder](./polyethylene.asynciterablebuilder.md) | A class that helps with building an from a non-structured source.<!-- -->In order to create the iteration, you must call the , and methods with appropriate arguments. |
| [PolyAsyncIterable](./polyethylene.polyasynciterable.md) | An <code>AsyncIterable<T></code> with a suite of methods for transforming the iteration into other iterations or to get a single result from it.<!-- -->This class works as an async version of [PolySyncIterable](./polyethylene.polysynciterable.md)<!-- -->, but all methods accept async function where possible and will always return either <code>PolyAsyncIterables</code> or a <code>Promise</code> to a value. |
| [PolySyncIterable](./polyethylene.polysynciterable.md) | A <code>SyncIterable<T></code> with a suite of methods for transforming the iteration into other iterations or to get a single result from it.<!-- -->The methods of this class are intended to resemble those of <code>Array</code>, with added utilities where appropriate and made for any kind of iterable. |
## Namespaces
| Namespace | Description |
| --- | --- |
| [Poly](./polyethylene.poly.md) | Main namespace for the creation of [PolySyncIterable](./polyethylene.polysynciterable.md) and [PolyAsyncIterable](./polyethylene.polyasynciterable.md) objects. |
## Type Aliases
| Type Alias | Description |
| --- | --- |
| [AsyncChunkingPredicate](./polyethylene.asyncchunkingpredicate.md) | A function that receives an element (<code>elem</code>) of the iteration and the first and last element of a chunk, and returns a boolean value or a <code>Promise</code> to a boolean value representing whether <code>elem</code> should be added to the current chunk (if <code>true</code>) or be the start of a new chunk (if <code>false</code>) |
| [AsyncIndexedMapping](./polyethylene.asyncindexedmapping.md) | A function that receives an object (<code>elem</code>) and its <code>index</code> in the iteration and returns a different object or a <code>Promise</code> to a different object |
| [AsyncIndexedPredicate](./polyethylene.asyncindexedpredicate.md) | A function that receives an object (<code>elem</code>) and its <code>index</code> in the iteration and returns a <code>boolean</code> value or a <code>Promise</code> to a <code>boolean</code> value. |
| [AsyncIndexedReducer](./polyethylene.asyncindexedreducer.md) | A function that receives an accumulated result, an element of an iteration, and returns a new accumulated result or a promise to a new accumulated result for the next call or as a final return value. |
| [AsyncIndexedRunnable](./polyethylene.asyncindexedrunnable.md) | A function that receives an object (<code>elem</code>) and its <code>index</code> in the iteration and either returns a <code>Promise</code> to nothing or doesn't return anything |
| [ChunkingPredicate](./polyethylene.chunkingpredicate.md) | A function that receives an element (<code>elem</code>) of the iteration and the first and last element of a chunk, and returns a boolean value representing whether <code>elem</code> should be added to the current chunk (if <code>true</code>) or be the start of a new chunk (if <code>false</code>) |
| [Comparator](./polyethylene.comparator.md) | A function that receives two objects <code>elemA</code> and <code>elemB</code> and returns a number value that is negative if <code>elemA</code> should be sorted before <code>elemB</code>, positive if <code>elemA</code> should be sorted after <code>elemB</code>, or <code>0</code> if they should be sorted at the same position. |
| [IndexedMapping](./polyethylene.indexedmapping.md) | A function that receives an object (<code>elem</code>) and its <code>index</code> in the iteration and returns a different object |
| [IndexedPredicate](./polyethylene.indexedpredicate.md) | A function that receives an object (<code>elem</code>) and its <code>index</code> in the iteration and returns a <code>boolean</code> value. |
| [IndexedReducer](./polyethylene.indexedreducer.md) | A function that receives an accumulated result, an element of an iteration, and returns a new accumulated result for the next call or as a final return value. |
| [IndexedRunnable](./polyethylene.indexedrunnable.md) | A function that receives an object (<code>elem</code>) and its <code>index</code> in the iteration and doesn't return anything |
| [IndexedTypePredicate](./polyethylene.indexedtypepredicate.md) | A function that receives an object (<code>elem</code>) and its <code>index</code> in the iteration and returns a <code>boolean</code> value indicating if <code>elem</code> is of the generic type <code>U</code> |