AsyncIterableReduce overview

Added in v1.0.0


Table of contents


sequencing

getAsyncIteratorNextTask

Signature

export declare function getAsyncIteratorNextTask<A>(iterable: AsyncIterable<A>): T.Task<O.Option<A>>

Added in v1.0.0

reduceUntilWithIndexLimited

generic async iterable reducer.

  • limit: how many values pull in parallel.
  • until: predicate if the function should keep pulling values from the iterator
  • b: reducer accumulator initial value.
  • f: reducer function.

Signature

export declare function reduceUntilWithIndexLimited<A, B>(
  limit: number,
  until: (a: A) => boolean,
  b: B,
  f: (i: number, b: B, a: A) => B
): (iterable: AsyncIterable<A>) => T.Task<B>

Added in v1.0.0