Identity

interface Identity<T> {
    @@type: string;
    [iterator](): Iterator<T, any, undefined>;
    ap<V>(applyFn: monet.Identity<((val: T) => V)>): monet.Identity<V>;
    apTo<V>(value: monet.Identity<V>): T extends ((arg: V) => any)
        ? monet.Identity<ReturnType<T<T>>>
        : never;
    bind<V>(fn: ((val: T) => monet.Identity<V>)): monet.Identity<V>;
    chain<V>(fn: ((val: T) => monet.Identity<V>)): monet.Identity<V>;
    contains(val: T): boolean;
    equals(other: monet.Identity<T>): boolean;
    every(fn: ((e: T) => boolean)): boolean;
    exists(fn: ((e: T) => boolean)): boolean;
    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.Identity<T>): boolean;
    fantasy-land/map?<V>(fn: ((val: T) => V)): monet.Functor<V>;
    flatMap<V>(fn: ((val: T) => monet.Identity<V>)): monet.Identity<V>;
    forEach(fn: ((val: T) => void)): void;
    forall(fn: ((e: T) => boolean)): boolean;
    get(): T;
    join<V>(): monet.Identity<V>;
    map<V>(fn: ((val: T) => V)): monet.Identity<V>;
    takeLeft(m: monet.Identity<T>): monet.Identity<T>;
    takeRight(m: monet.Identity<T>): monet.Identity<T>;
    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 Identity
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

    • val: T

    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

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

  • Returns Set<T>