pragmatic-fp-ts
Version:
Opinionated functional programming library with easy use in mind
7 lines (6 loc) • 402 B
TypeScript
import { Dictionary } from "./main";
type FoldKV<A, B> = (accum: B, value: A, key: string) => B;
export declare function reduceKV<A, B>(fold: FoldKV<A, B>, start: B, dict: Dictionary<A>): B;
export declare function reduceKV<A, B>(fold: FoldKV<A, B>, start: B): (dict: Dictionary<A>) => B;
export declare function reduceKV<A, B>(fold: FoldKV<A, B>): (start: B) => (dict: Dictionary<A>) => B;
export {};