import type { Fn } from "@thi.ng/api"; import type { Transducer } from "./api.js"; /** * Transducer. Applies given `fn` to each incoming value and collects * values until the return value of the `fn` has changed. Once this * happens yields chunk of buffered values. * * @example * ```ts tangle:../export/partition-by.ts * import { partitionBy } from "@thi.ng/transducers"; * * console.log( * [...partitionBy((x) => x & 1, [1, 2, 4, 6, 3, 5, 8, 4])] * ); * // [ [ 1 ], [ 2, 4, 6 ], [ 3, 5 ], [ 8, 4 ] ] * ``` * * @param fn - * @param stateful - */ export declare function partitionBy(fn: Fn | (() => Fn), stateful?: boolean): Transducer; export declare function partitionBy(fn: Fn | (() => Fn), src: Iterable): IterableIterator; export declare function partitionBy(fn: Fn | (() => Fn), stateful: boolean, src: Iterable): IterableIterator; //# sourceMappingURL=partition-by.d.ts.map