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

Type Parameters

Parameters

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

Return Type

Usage

import { fold } from "index.ts";