UNPKG

383 BTypeScriptView Raw
1declare module "@extra-array/accumulate" {
2import type { reduceFn } from "./_types";
3/**
4 * Produces accumulating values.
5 * @param x an array
6 * @param fr reduce function (acc, v, i, x)
7 * @param acc initial value
8 */
9declare function accumulate<T, U = T>(x: Iterable<T>, fr: reduceFn<T, T | U>, acc?: T | U): T | U[];
10export = accumulate;
11//# sourceMappingURL=accumulate.d.ts.map}