NEL

interface NEL<T> {
    @@type: string;
    [iterator](): Iterator<T, any, undefined>;
    ap<V>(listFn: monet.NEL<((val: T) => V)>): monet.NEL<V>;
    apTo<V>(listVal: monet.NEL<V>): T extends ((arg: V) => any)
        ? monet.NEL<ReturnType<T<T>>>
        : never;
    append(list: monet.NEL<T>): monet.NEL<T>;
    bind<V>(fn: ((val: T) => monet.NEL<V>)): monet.NEL<V>;
    chain<V>(fn: ((val: T) => monet.NEL<V>)): monet.NEL<V>;
    cobind<V>(fn: ((val: monet.NEL<T>) => V)): monet.NEL<V>;
    coflatMap<V>(fn: ((val: monet.NEL<T>) => V)): monet.NEL<V>;
    cojoin(): monet.NEL<monet.NEL<T>>;
    concat(list: monet.NEL<T>): monet.NEL<T>;
    cons(a: T): monet.NEL<T>;
    contains(val: T): boolean;
    copure(): T;
    equals(other: monet.NEL<T>): boolean;
    every(fn: ((e: T) => boolean)): boolean;
    exists(fn: ((e: T) => boolean)): boolean;
    extract(): T;
    fantasy-land/ap?<V>(afn: monet.Applicative<((val: T) => V)>): monet.Applicative<V>;
    fantasy-land/chain?<V>(fn: ((val: T) => monet.Chain<V>)): monet.Chain<V>;
    fantasy-land/equals?(other: monet.NEL<T>): boolean;
    fantasy-land/map?<V>(fn: ((val: T) => V)): monet.Functor<V>;
    filter(fn: ((val: T) => boolean)): monet.List<T>;
    filterNot(fn: ((val: T) => boolean)): monet.List<T>;
    find(fn: ((val: T) => boolean)): monet.Maybe<T>;
    flatMap<V>(fn: ((val: T) => monet.NEL<V>)): monet.NEL<V>;
    flatten<V>(): T extends monet.List<V> | monet.NEL<V>
        ? monet.List<V>
        : never;
    flattenMaybe<V>(): T extends monet.Maybe<V>
        ? monet.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(): T;
    isNEL(): boolean;
    join<V>(): monet.NEL<V>;
    lookup(i: number): monet.Maybe<T>;
    map<V>(fn: ((val: T) => V)): monet.NEL<V>;
    mapTails<V>(fn: ((val: monet.NEL<T>) => V)): monet.NEL<V>;
    nth(i: number): undefined | T;
    reduceLeft(fn: ((acc: T, element: T) => T)): T;
    reverse(): monet.NEL<T>;
    size(): number;
    snoc(a: T): monet.NEL<T>;
    tail(): monet.List<T>;
    tails(): monet.NEL<monet.NEL<T>>;
    takeLeft<V>(m: monet.NEL<V>): monet.NEL<T>;
    takeRight<V>(m: monet.NEL<V>): monet.NEL<V>;
    to<I extends Iterable<T>>(ctor: ((iter: Iterable<T>) => I)): I;
    toArray(): T[];
    toList(): monet.List<T>;
    toSet(): Set<T>;
}

Type Parameters

  • T

Hierarchy-Diagram

UML class diagram of NEL
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

  • Parameters

    Returns monet.NEL<T>

  • Parameters

    • val: T

    Returns boolean

  • Returns T

  • 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

  • Returns T

  • Parameters

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

          • val: T

          Returns boolean

    Returns monet.List<T>

  • Parameters

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

          • val: T

          Returns boolean

    Returns monet.List<T>

  • Parameters

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

          • val: T

          Returns boolean

    Returns monet.Maybe<T>

  • 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 T

  • Returns boolean

  • Parameters

    • i: number

    Returns monet.Maybe<T>

  • Type Parameters

    • V

    Parameters

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

          • val: T

          Returns V

    Returns monet.NEL<V>

  • Parameters

    • i: number

    Returns undefined | T

  • Parameters

    • fn: ((acc: T, element: T) => T)
        • (acc: T, element: T): T
        • Parameters

          • acc: T
          • element: T

          Returns T

    Returns T

  • Returns monet.NEL<T>

  • Returns number

  • Parameters

    Returns monet.NEL<T>

  • Returns T[]

  • Returns Set<T>