Interface OpticalCat<M, S, T, A, B>

Type Parameters

  • M

  • S

  • T

  • A

  • B

Hierarchy

  • OpticalCat

Properties

feed: (<X, Y>(o) => OpticalCat<M, S, T, X, Y>)

Type declaration

    • <X, Y>(o): OpticalCat<M, S, T, X, Y>
    • Feeds the Optic and produces a new environment.

      Type Parameters

      • X

      • Y

      Parameters

      • o: Optical<M, A, B, X, Y>

        The computation such as Lens, Prism and so on.

      Returns OpticalCat<M, S, T, X, Y>

      Modified environment.

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

Type declaration

    • (): Get1<M, Option<A>>
    • Extracts the value of the focused entry.

      Returns Get1<M, Option<A>>

      Extracted value if exists.

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

Type declaration

    • (modifier): Get1<M, T>
    • Modifies the value of the focused entry.

      Parameters

      • modifier: ((a) => B)

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

          • (a): B
          • Parameters

            • a: A

            Returns B

      Returns Get1<M, T>

      Whole of data with the entry modified.

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

Type declaration

    • (value): Get1<M, T>
    • Overwrites the value of the focused entry.

      Parameters

      • value: B

        The value to be placed.

      Returns Get1<M, T>

      Whole of data with value.

setWith: ((setter) => Get1<M, T>)

Type declaration

    • (setter): Get1<M, T>
    • Overwrites the value with the modifying computation.

      Parameters

      • setter: Setter<A, B>

        The finish computation to add.

      Returns Get1<M, T>

      Whole of data with setter.

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

Type declaration

    • (): Get1<M, A>
    • Extracts the value of the focused entry, or throws an error if not found.

      Returns Get1<M, A>

      Extracted value.

Generated using TypeDoc