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

    Type Alias OpticalCat<M, S, T, A, B>

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

    Type Parameters

    • M
    • S
    • T
    • A
    • B
    Index

    Properties

    feed: <X, Y>(o: Optical.Optical<M, A, B, X, Y>) => OpticalCat<M, S, T, X, Y>

    Feeds the Optic and produces a new environment.

    Type Declaration

    get: () => Get1<M, Option.Option<A>>

    Extracts the value of the focused entry.

    Type Declaration

    over: (modifier: (a: A) => B) => Get1<M, T>

    Modifies the value of the focused entry.

    Type Declaration

      • (modifier: (a: A) => B): Get1<M, T>
      • Parameters

        • modifier: (a: A) => B

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

        Returns Get1<M, T>

        Whole of data with the entry modified.

    set: (value: B) => Get1<M, T>

    Overwrites the value of the focused entry.

    Type Declaration

      • (value: B): Get1<M, T>
      • Parameters

        • value: B

          The value to be placed.

        Returns Get1<M, T>

        Whole of data with value.

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

    Overwrites the value with the modifying computation.

    Type Declaration

    unwrap: () => Get1<M, A>

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

    Type Declaration