function reduce
reduce<T>(
iterable: AsyncIterable<T>,
accumulate: (
accumulator: T,
value: T,
) => T
,
): Promise<T | undefined>

Type Parameters

Parameters

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

Return Type

Promise<T | undefined>

Usage

import { reduce } from "async.ts";