List

interface List<T> {
    @@type: string;
    [iterator](): Iterator<T, any, undefined>;
    ap<V>(listFn: List<((val: T) => V)>): List<V>;
    apTo<V>(listVal: List<V>): T extends ((arg: V) => any)
        ? List<ReturnType<T<T>>>
        : never;
    append(list: List<T>): List<T>;
    bind<V>(fn: ((val: T) => List<V>)): List<V>;
    chain<V>(fn: ((val: T) => List<V>)): List<V>;
    concat(list: List<T>): List<T>;
    cons(a: T): List<T>;
    contains(val: T): boolean;
    equals(other: List<T>): boolean;
    every(fn: ((e: T) => boolean)): boolean;
    exists(fn: ((e: T) => boolean)): boolean;
    fantasy-land/ap?<V>(afn: Applicative<((val: T) => V)>): Applicative<V>;
    fantasy-land/chain?<V>(fn: ((val: T) => Chain<V>)): Chain<V>;
    fantasy-land/equals?(other: List<T>): boolean;
    fantasy-land/map?<V>(fn: ((val: T) => V)): Functor<V>;
    filter(fn: ((val: T) => boolean)): List<T>;
    filterNot(fn: ((val: T) => boolean)): List<T>;
    find(fn: ((val: T) => boolean)): Maybe<NonNullable<T>>;
    flatMap<V>(fn: ((val: T) => List<V>)): List<V>;
    flatten<V>(): List<V>;
    flattenMaybe<V>(): T extends Maybe<V>
        ? List<V>
        : never;
    foldLeft<V>(initial: V): ((fn: ((acc: V, val: T) => V)) => V);
    foldRight<V>(initial: V): ((fn: ((val: T, acc: V) => V)) => V);
    forEach(fn: ((val: T) => void)): void;
    forall(fn: ((e: T) => boolean)): boolean;
    head(): undefined | T;
    headMaybe(): Maybe<NonNullable<T>>;
    isNEL(): boolean;
    join<V>(): List<V>;
    lookup(i: number): Maybe<T>;
    map<V>(fn: ((val: T) => V)): List<V>;
    nth(i: number): undefined | T;
    reverse(): List<T>;
    sequence<V>(m: IMaybeStatic): Maybe<List<V>>;
    sequence<E, V>(m: IEitherStatic): Either<E, List<V>>;
    sequence<E, V>(m: IValidationStatic): Validation<List<E>, List<V>>;
    sequence<V>(m: IIOStatic): IO<List<V>>;
    sequence<E, A>(m: IReaderStatic): Reader<E, List<A>>;
    sequenceEither<E, V>(): Either<E, List<V>>;
    sequenceIO<V>(): IO<List<V>>;
    sequenceMaybe<V>(): Maybe<List<V>>;
    sequenceReader<E, A>(): Reader<E, List<A>>;
    sequenceValidation<E, V>(): Validation<List<E>, List<V>>;
    size(): number;
    snoc(a: T): List<T>;
    tail(): List<T>;
    tails(): List<List<T>>;
    takeLeft<V>(m: List<V>): List<T>;
    takeRight<V>(m: List<V>): List<V>;
    to<I extends Iterable<T>>(ctor: ((iter: Iterable<T>) => I)): I;
    toArray(): T[];
    toSet(): Set<T>;
}

Type Parameters

  • T

Hierarchy-Diagram

UML class diagram of List
Legend
icon for an interface in the UML class diagram interface
icon for a public method in the UML class diagram public method

Hierarchy (view full)

Properties

@@type: string

Methods

  • Type Parameters

    • V

    Parameters

    Returns List<V>

  • Type Parameters

    • V

    Parameters

    Returns T extends ((arg: V) => any)
        ? List<ReturnType<T<T>>>
        : never

  • Parameters

    Returns List<T>

  • Type Parameters

    • V

    Parameters

    Returns List<V>

  • Type Parameters

    • V

    Parameters

    Returns List<V>

  • Parameters

    Returns List<T>

  • Parameters

    Returns List<T>

  • Parameters

    • val: T

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    • fn: ((e: T) => boolean)
        • (e: T): boolean
        • Parameters

          Returns boolean

    Returns boolean

  • Parameters

    • fn: ((e: T) => boolean)
        • (e: T): boolean
        • Parameters

          Returns boolean

    Returns boolean

  • Type Parameters

    • V

    Parameters

    • fn: ((val: T) => V)
        • (val: T): V
        • Parameters

          • val: T

          Returns V

    Returns Functor<V>

  • Parameters

    • fn: ((val: T) => boolean)
        • (val: T): boolean
        • Parameters

          • val: T

          Returns boolean

    Returns List<T>

  • Parameters

    • fn: ((val: T) => boolean)
        • (val: T): boolean
        • Parameters

          • val: T

          Returns boolean

    Returns List<T>

  • Parameters

    • fn: ((val: T) => boolean)
        • (val: T): boolean
        • Parameters

          • val: T

          Returns boolean

    Returns Maybe<NonNullable<T>>

  • Type Parameters

    • V

    Returns List<V>

  • Type Parameters

    • V

    Returns T extends Maybe<V>
        ? List<V>
        : never

  • Type Parameters

    • V

    Parameters

    • initial: V

    Returns ((fn: ((acc: V, val: T) => V)) => V)

      • (fn: ((acc: V, val: T) => V)): V
      • Parameters

        • fn: ((acc: V, val: T) => V)
            • (acc: V, val: T): V
            • Parameters

              • acc: V
              • val: T

              Returns V

        Returns V

  • Type Parameters

    • V

    Parameters

    • initial: V

    Returns ((fn: ((val: T, acc: V) => V)) => V)

      • (fn: ((val: T, acc: V) => V)): V
      • Parameters

        • fn: ((val: T, acc: V) => V)
            • (val: T, acc: V): V
            • Parameters

              • val: T
              • acc: V

              Returns V

        Returns V

  • Parameters

    • fn: ((val: T) => void)
        • (val: T): void
        • Parameters

          • val: T

          Returns void

    Returns void

  • Parameters

    • fn: ((e: T) => boolean)
        • (e: T): boolean
        • Parameters

          Returns boolean

    Returns boolean

  • Returns undefined | T

  • Returns boolean

  • Type Parameters

    • V

    Returns List<V>

  • Parameters

    • i: number

    Returns Maybe<T>

  • Type Parameters

    • V

    Parameters

    • fn: ((val: T) => V)
        • (val: T): V
        • Parameters

          • val: T

          Returns V

    Returns List<V>

  • Parameters

    • i: number

    Returns undefined | T

  • Returns List<T>

  • Type Parameters

    • E
    • V

    Returns Either<E, List<V>>

  • Type Parameters

    • V

    Returns IO<List<V>>

  • Type Parameters

    • V

    Returns Maybe<List<V>>

  • Type Parameters

    • E
    • A

    Returns Reader<E, List<A>>

  • Returns number

  • Parameters

    Returns List<T>

  • Returns List<T>

  • Returns List<List<T>>

  • Returns T[]

  • Returns Set<T>