@mikuroxina/mini-fn
    Preparing search index...

    Type Alias OpticCat<S, T, A, B>

    type OpticCat<S, T, A, B> = {
        feed: <X, Y>(o: Optic<A, B, X, Y>) => OpticCat<S, T, X, Y>;
        get: () => Option.Option<A>;
        over: (modifier: (a: A) => B) => T;
        set: (value: B) => T;
        setWith: (setter: Optical.Setter.Setter<A, B>) => T;
        unwrap: () => A;
    }

    Type Parameters

    • S
    • T
    • A
    • B
    Index

    Properties

    feed: <X, Y>(o: Optic<A, B, X, Y>) => OpticCat<S, T, X, Y>

    Feeds the Optic and produces a new environment.

    Type Declaration

      • <X, Y>(o: Optic<A, B, X, Y>): OpticCat<S, T, X, Y>
      • Type Parameters

        • X
        • Y

        Parameters

        • o: Optic<A, B, X, Y>

          The computation such as Lens, Prism and so on.

        Returns OpticCat<S, T, X, Y>

        Modified environment.

    get: () => Option.Option<A>

    Extracts the value of the focused entry.

    Type Declaration

    over: (modifier: (a: A) => B) => T

    Modifies the value of the focused entry.

    Type Declaration

      • (modifier: (a: A) => B): T
      • Parameters

        • modifier: (a: A) => B

          The function which maps from the entry value to you desired.

        Returns T

        Whole of data with the entry modified.

    set: (value: B) => T

    Overwrites the value of the focused entry.

    Type Declaration

      • (value: B): T
      • Parameters

        • value: B

          The value to be placed.

        Returns T

        Whole of data with value.

    setWith: (setter: Optical.Setter.Setter<A, B>) => T

    Overwrites the value with the modifying computation.

    Type Declaration

    unwrap: () => A

    Extracts the value of the focused entry, or throws an error if not found.

    Type Declaration

      • (): A
      • Returns A

        Extracted value.