@thi.ng/transducers
Version:
Collection of ~170 lightweight, composable transducers, reducers, generators, iterators for functional data transformations
6 lines • 345 B
TypeScript
import type { Fn } from "@thi.ng/api";
import type { Transducer } from "./api.js";
export type LabelFn<L, T> = L | Fn<T, L>;
export declare function labeled<L, T>(id: LabelFn<L, T>): Transducer<T, [L, T]>;
export declare function labeled<L, T>(id: LabelFn<L, T>, src: Iterable<T>): IterableIterator<[L, T]>;
//# sourceMappingURL=labeled.d.ts.map