Package io.atlassian.fugue.optic
package io.atlassian.fugue.optic
-
ClassesClassDescriptionFold<S,
A> AFoldcan be seen as aGetterwith many targets or a weakerPTraversalwhich cannot modify its target.Getter<S,A> AGettercan be seen as a glorified get method between a type S and a type A.Iso<S,A> PIsowhen S = T and A = BLens<S,A> PLenswith a monomorphic set functionOptional<S,A> POptionalrestricted to monomorphic updatePIso<S,T, A, B> APIsodefines an isomorphism between types S, A and B, T:PLens<S,T, A, B> APLenscan be seen as a pair of functions: - `get: S => A` i.e.POptional<S,T, A, B> APOptionalcan be seen as a pair of functions: - `getOrModify: S => T \/ A` - `set : (B, S) => T`PPrism<S,T, A, B> APPrismcan be seen as a pair of functions: - `getOrModify: S => T \/ A` - `reverseGet : B => T`Prism<S,A> PPrismrestricted to monomorphic updatePSetter<S,T, A, B> APSetteris a generalisation of Functor map: - `map: (A => B) => F[A] => F[B]` - `modify: (A => B) => S => T`PTraversal<S,T, A, B> APTraversalcan be seen as aPOptionalgeneralised to 0 to n targets where n can be infinite.Setter<S,A> PSetterwith a monomorphic modify functionTraversal<S,A>