interface GeneratorMapParams { index: number; } /** * Maps values from an iterable to a new generator. * * **Supported call styles:** * - Classic: `map(iterator, theFunction)` → returns a generator * - Curried: `map(theFunction)` → returns a function waiting for the iterator * * The function receives `(item, { index })`. * The input iterator is not mutated. * * ```ts * const values = [8, 12, 20]; * const rate = 1.1; * * const result = pipe( * values, * G.map((value) => N.multiply(value, rate)), * G.reduce( * G.reduceFrom([]), * ({ element, lastValue, next }) => next([ * ...lastValue, * element, * ]), * ), * ); * * ``` * * @see [`G.filter`](https://utils.duplojs.dev/en/v1/api/generator/filter) For filtering values * @see [`G.asyncMap`](https://utils.duplojs.dev/en/v1/api/generator/asyncMap) For async iterables * @see https://utils.duplojs.dev/en/v1/api/generator/map * * @namespace G * */ export declare function map(theFunction: (arg: GenericInput, params: GeneratorMapParams) => GenericOutput): (iterator: Iterable) => Generator; export declare function map(iterator: Iterable, theFunction: (arg: GenericInput, params: GeneratorMapParams) => GenericOutput): Generator; export {};