@telostat/prelude - v0.7.0
    Preparing search index...

    Interface Tuple<F, S>

    interface Tuple<F, S> {
        "0": F;
        "1": S;
        length: 2;
        "[iterator]"(): Iterator<F | S, any, any>;
        ap<T, S2>(f: Tuple<T, (value: S) => S2>): Tuple<F, S2>;
        bimap<F2, S2>(f: (fst: F) => F2, g: (snd: S) => S2): Tuple<F2, S2>;
        equals(other: Tuple<F, S>): boolean;
        every(pred: (value: F | S) => boolean): boolean;
        "fantasy-land/ap"<T, S2>(f: Tuple<T, (value: S) => S2>): Tuple<F, S2>;
        "fantasy-land/bimap"<F2, S2>(
            f: (fst: F) => F2,
            g: (snd: S) => S2,
        ): Tuple<F2, S2>;
        "fantasy-land/equals"(other: Tuple<F, S>): boolean;
        "fantasy-land/map"<S2>(f: (snd: S) => S2): Tuple<F, S2>;
        "fantasy-land/reduce"<T>(
            reducer: (accumulator: T, value: S) => T,
            initialValue: T,
        ): T;
        fst(): F;
        inspect(): string;
        map<S2>(f: (snd: S) => S2): Tuple<F, S2>;
        mapFirst<F2>(f: (fst: F) => F2): Tuple<F2, S>;
        reduce<T>(reducer: (accumulator: T, value: S) => T, initialValue: T): T;
        snd(): S;
        some(pred: (value: F | S) => boolean): boolean;
        swap(): Tuple<S, F>;
        toArray(): [F, S];
        toJSON(): [F, S];
        toString(): string;
        [index: number]: F | S;
    }

    Type Parameters

    • F
    • S

    Hierarchy

    • Iterable<F | S>
    • ArrayLike<F | S>
      • Tuple

    Indexable

    • [index: number]: F | S
    Index

    Properties

    "0": F
    "1": S
    length: 2

    Methods

    • Returns Iterator<F | S, any, any>

    • Applies the second value of a tuple to the second value of this

      Type Parameters

      • T
      • S2

      Parameters

      Returns Tuple<F, S2>

    • Transforms the two values inside this with two mapper functions

      Type Parameters

      • F2
      • S2

      Parameters

      • f: (fst: F) => F2
      • g: (snd: S) => S2

      Returns Tuple<F2, S2>

    • Compares the values inside this and another tuple

      Parameters

      Returns boolean

    • Tests whether both elements in the tuple pass the test implemented by the provided function

      Parameters

      • pred: (value: F | S) => boolean

      Returns boolean

    • Type Parameters

      • T
      • S2

      Parameters

      Returns Tuple<F, S2>

    • Type Parameters

      • F2
      • S2

      Parameters

      • f: (fst: F) => F2
      • g: (snd: S) => S2

      Returns Tuple<F2, S2>

    • Parameters

      Returns boolean

    • Type Parameters

      • S2

      Parameters

      • f: (snd: S) => S2

      Returns Tuple<F, S2>

    • Type Parameters

      • T

      Parameters

      • reducer: (accumulator: T, value: S) => T
      • initialValue: T

      Returns T

    • Returns the first value of this

      Returns F

    • Returns string

    • Applies a function to the second value of this

      Type Parameters

      • S2

      Parameters

      • f: (snd: S) => S2

      Returns Tuple<F, S2>

    • Applies a function to the first value of this

      Type Parameters

      • F2

      Parameters

      • f: (fst: F) => F2

      Returns Tuple<F2, S>

    • A somewhat arbitrary implementation of Foldable for Tuple, the reducer will be passed the initial value and the second value inside this as arguments

      Type Parameters

      • T

      Parameters

      • reducer: (accumulator: T, value: S) => T
      • initialValue: T

      Returns T

    • Returns the second value of this

      Returns S

    • Tests whether at least one element in the tuple passes the test implemented by the provided function

      Parameters

      • pred: (value: F | S) => boolean

      Returns boolean

    • Swaps the values inside this

      Returns Tuple<S, F>

    • Returns an array with 2 elements - the values inside this

      Returns [F, S]

    • Returns [F, S]

    • Returns a string representation of an object.

      Returns string