export interface TupleTypeRef { (fst: F, snd: S): Tuple; /** Applies two functions over a single value and constructs a tuple from the results */ fanout(f: (value: T) => F, g: (value: T) => S, value: T): Tuple; fanout(f: (value: T) => F, g: (value: T) => S): (value: T) => Tuple; fanout(f: (value: T) => F): (g: (value: T) => S) => (value: T) => Tuple; /** Constructs a tuple from an array with two elements */ fromArray([fst, snd]: [F, S]): Tuple; } export interface Tuple extends Iterable, ArrayLike { 0: F; 1: S; [index: number]: F | S; length: 2; toJSON(): [F, S]; inspect(): string; toString(): string; /** Returns the first value of `this` */ fst(): F; /** Returns the second value of `this` */ snd(): S; /** Compares the values inside `this` and another tuple */ equals(other: Tuple): boolean; /** Transforms the two values inside `this` with two mapper functions */ bimap(f: (fst: F) => F2, g: (snd: S) => S2): Tuple; /** Applies a function to the first value of `this` */ mapFirst(f: (fst: F) => F2): Tuple; /** Applies a function to the second value of `this` */ map(f: (snd: S) => S2): Tuple; /** A somewhat arbitrary implementation of Foldable for Tuple, the reducer will be passed the initial value and the second value inside `this` as arguments */ reduce(reducer: (accumulator: T, value: S) => T, initialValue: T): T; /** Returns an array with 2 elements - the values inside `this` */ toArray(): [F, S]; /** Swaps the values inside `this` */ swap(): Tuple; /** Applies the second value of a tuple to the second value of `this` */ ap(f: Tuple S2>): Tuple; /** Tests whether both elements in the tuple pass the test implemented by the provided function */ every(pred: (value: F | S) => boolean): boolean; /** Tests whether at least one element in the tuple passes the test implemented by the provided function */ some(pred: (value: F | S) => boolean): boolean; 'fantasy-land/equals'(other: Tuple): boolean; 'fantasy-land/bimap'(f: (fst: F) => F2, g: (snd: S) => S2): Tuple; 'fantasy-land/map'(f: (snd: S) => S2): Tuple; 'fantasy-land/reduce'(reducer: (accumulator: T, value: S) => T, initialValue: T): T; 'fantasy-land/ap'(f: Tuple S2>): Tuple; } export declare const Tuple: TupleTypeRef;