Package fj.data.optic


package fj.data.optic
Optic data types adapted from the Scala Monocle library and inspired by the Haskell Lens library. See the Monocle Github page for an overview of the package.
Version:
%build.number%
See Also:
  • Classes
    Class
    Description
    Fold<S,A>
    A Fold can be seen as a Getter with many targets or a weaker PTraversal which cannot modify its target.
    Getter<S,A>
    A Getter can be seen as a glorified get method between a type S and a type A.
    Iso<S,A>
    PIso when S = T and A = B
    Lens<S,A>
    PLens with a monomorphic set function
    POptional restricted to monomorphic update
    PIso<S,T,A,B>
    A PIso defines an isomorphism between types S, A and B, T:
    PLens<S,T,A,B>
    A PLens can be seen as a pair of functions: get: S => A i.e.
    POptional<S,T,A,B>
    A POptional can be seen as a pair of functions: getOrModify: S => T \/ A set : (B, S) => T
    PPrism<S,T,A,B>
    A PPrism can be seen as a pair of functions: getOrModify: S => T \/ A reverseGet : B => T
    Prism<S,A>
    PPrism restricted to monomorphic update
    PSetter<S,T,A,B>
    A PSetter is a generalisation of Functor map: map: (A => B) => F[A] => F[B] modify: (A => B) => S => T
    PTraversal<S,T,A,B>
    A PTraversal can be seen as a POptional generalised to 0 to n targets where n can be infinite.
    Setter<S,A>
    PSetter with a monomorphic modify function