import type { Fn2 } from "@thi.ng/api"; import type { Transducer } from "./api.js"; /** * Transducer. Similar to {@link map}, but given `fn` takes two arguments: * `index` and `value` to transform. * * @remarks * An optional start index `offset` can be provided (default 0). * * @example * ```ts tangle:../export/map-indexed.ts * import { mapIndexed } from "@thi.ng/transducers"; * * console.log( * [...mapIndexed((i, x) => ["id" + i, x * 10], 42, [1, 2, 3])] * ); * // [ [ "id42", 10 ], [ "id43", 20 ], [ "id44", 30 ] ] * ``` * * @param fn - transformation function * @param offset - initial index */ export declare function mapIndexed(fn: Fn2, offset?: number): Transducer; export declare function mapIndexed(fn: Fn2, src: Iterable): IterableIterator; export declare function mapIndexed(fn: Fn2, offset: number, src: Iterable): IterableIterator; //# sourceMappingURL=map-indexed.d.ts.map