Reader

interface Reader<E, A> {
    @@type: string;
    ap<B>(rfn: Reader<E, ((val: A) => B)>): Reader<E, B>;
    apTo<B>(value: Reader<E, B>): A extends ((arg: B) => any)
        ? Reader<E, ReturnType<A<A>>>
        : never;
    bind<B>(fn: ((val: A) => Reader<E, B>)): Reader<E, B>;
    chain<B>(fn: ((val: A) => Reader<E, B>)): Reader<E, B>;
    fantasy-land/ap?<V>(afn: Applicative<((val: A) => V)>): Applicative<V>;
    fantasy-land/chain?<V>(fn: ((val: A) => Chain<V>)): Chain<V>;
    fantasy-land/map?<V>(fn: ((val: A) => V)): Functor<V>;
    flatMap<B>(fn: ((val: A) => Reader<E, B>)): Reader<E, B>;
    join<B>(): Reader<E, B>;
    local<X>(fn: ((val: X) => E)): Reader<X, A>;
    map<B>(fn: ((val: A) => B)): Reader<E, B>;
    run(config: E): A;
    takeLeft<X>(m: Reader<E, X>): Reader<E, A>;
    takeRight<B>(m: Reader<E, B>): Reader<E, B>;
}

Type Parameters

  • E
  • A

Hierarchy-Diagram

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

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

          • val: A

          Returns V

    Returns Functor<V>

  • Type Parameters

    • X

    Parameters

    • fn: ((val: X) => E)
        • (val: X): E
        • Parameters

          • val: X

          Returns E

    Returns Reader<X, A>

  • Type Parameters

    • B

    Parameters

    • fn: ((val: A) => B)
        • (val: A): B
        • Parameters

          • val: A

          Returns B

    Returns Reader<E, B>

  • Parameters

    • config: E

    Returns A