Function optic

    • Build an optic from a forward and a backward. A 2-arg put(b, a) reads the source; a 1-arg put(b) reconstructs it (and is treated as an iso).

      Type Parameters

      • A
      • B

      Parameters

      • get: (a: A) => B
      • put: (b: B, a: A) => A

      Returns Optic<A, B>