export { compare } from "./array.js";
export type { CompareOptions } from "./array.js";
/**
 * The equivalent of Array.prototype.map for iterators.
 *
 * @param iterable The iterator to map over.
 * @param f The mapping function.
 */
export declare function map<T, U>(iterable: Iterable<T>, f: (x: T, index: number) => U): Iterable<U>;
/**
 * The equivalent of Array.prototype.reduce for iterators.
 *
 * @param iterable The iterator to reduce.
 * @param f The reducer function.
 * @param initial The initial value to use for reduction.
 */
export declare function reduce<T, U>(iterable: Iterable<T>, f: (previous: U, current: T, index?: number) => U, initial: U): U;
/**
 * The equivalent of Array.prototype.concat for iterators.
 *
 * @param iterable The initial value to add to.
 * @param values Additional iterables to concatenate with the initial value.
 */
export declare function concat<T>(iterable: Iterable<T>, ...values: (T | Iterable<T>)[]): Iterable<T>;
/**
 * The equivalent of Array.prototype.every for iterators.
 *
 * @param iterable The iterator to check.
 * @param p A predicate function.
 */
export declare function every<T>(iterable: Iterable<T>, p: (x: T, index?: number) => boolean): boolean;
/**
 * The equivalent of Array.prototype.filter for iterators.
 *
 * @param iterable The iterator to filter.
 * @param p The filter predicate.
 */
export declare function filter<T>(iterable: Iterable<T>, p: (x: T, index?: number) => boolean): Iterable<T>;
/**
 * The equivalent of Array.prototype.find for iterators.
 *
 * @param iterable The iterator to search.
 * @param p The predicate function.
 */
export declare function find<T>(iterable: Iterable<T>, p: (x: T, index?: number) => boolean): T | undefined;
/**
 * Returns the first element in an Iterable, or undefined if there are no
 * elements.
 *
 * @param iterable The iterator.
 */
export declare function first<T>(iterable: Iterable<T>): T | undefined;
/**
 * Flattens an iterable collection of iterable objects into a single iterable.
 *
 * @param iterables An iterable collections of iterables.
 */
export declare function flatten<T>(iterables: Iterable<Iterable<T>>): Iterable<T>;
/**
 * The equivalent of Array.prototype.forEach for iterators.
 *
 * @param iterable The iterator to loop over.
 * @param f The iteration function.
 */
export declare function forEach<T>(iterable: Iterable<T>, f: (x: T, index?: number) => void): void;
/**
 * The equivalent of Array.prototype.some for iterators.
 *
 * @param iterable The iterator to check.
 * @param p The predicate function.
 */
export declare function some<T>(iterable: Iterable<T>, p: (x: T, index?: number) => boolean): boolean;
/**
 * Converts a single item into an iterable.
 *
 * @param item The item to convert.
 */
export declare function fromSingleItem<T>(item: T): Iterable<T>;
/**
 * The equivalent of Array.prototype.length for iterators.
 *
 * @param iterable The iterator to check.
 */
export declare function length<T>(iterable: Iterable<T>): number;
