function fold
fold<T, S>(
iterable: AsyncIterable<T>,
initial: S,
accumulate: (
accumulator: S,
value: T
) => S
): Promise<S>

Type Parameters

Parameters

iterable: AsyncIterable<T>
initial: S
accumulate: (
accumulator: S,
value: T
) => S

Return Type

Promise<S>

Usage

import { fold } from "async.ts";