/** * Combines two iterables by applying a selector to aligned pairs until either source is exhausted. * * @typeParam T - Element type produced by the first iterable. * @typeParam TOther - Element type produced by the second iterable. * @typeParam TOut - Element type yielded by the selector. * @param src - Primary iterable providing the first element of each pair. * @param seq - Secondary iterable providing the second element of each pair. * @param selector - Function mapping a pair of elements to the emitted value. * @returns A deferred iterable yielding the selector results for each aligned pair. * @throws Error Rethrows any error thrown by `selector`. * * @example * ```ts * const result = _zip( * [1, 2], * ["a", "b"], * (value, label) => `${value}${label}` * ); * console.log([...result]); // ["1a", "2b"] * ``` * * or using the curried version: * ```ts * const result = [ * ...pipeInto( * [1, 2], * zip( * ["a", "b"], * (value, label) => `${value}${label}` * ) * ), * ]; * console.log(result); // ["1a", "2b"] * ``` */ export declare function _zip(src: Iterable, seq: Iterable, selector: (item1: T, item2: TOther) => TOut): Iterable; /** * Curried version of {@link _zip}. */ export declare const zip: (seq: Iterable, selector: (item1: T, item2: TOther) => TOut) => (src: Iterable) => Iterable;