get the target of a POptional or nothing if there is no target
get the target of a POptional or return the original value while allowing the type to change if it does not match
modify polymorphically the target of a POptional with a function
modify polymorphically the target of a POptional with an Applicative function
get the modified source of a POptional
alias to composeIso
alias to composeIso
alias to composePrism
alias to composePrism
alias to composeLens
alias to composeLens
alias to composeTraversal
alias to composeTraversal
alias to composeOptional
alias to composeOptional
check if there is no target or the target satisfies the predicate
check if there is no target or the target satisfies the predicate
view a POptional as a PTraversal
view a POptional as a PTraversal
join two POptional with the same target
join two POptional with the same target
compose a POptional with a PTraversal
compose a POptional with a PTraversal
check if there is a target and it satisfies the predicate
check if there is a target and it satisfies the predicate
find if the target satisfies the predicate
find if the target satisfies the predicate
check if there is no target
check if there is no target
modify polymorphically the target of a POptional with a function.
check if there is a target
check if there is a target
set polymorphically the target of a POptional with a value.
A POptional can be seen as a pair of functions:
getOrModify: S => T \/ A
set : (B, S) => T
A POptional could also be defined as a weaker PLens and weaker PPrism
POptional stands for Polymorphic Optional as it set and modify methods change a type
A
toB
andS
toT
. Optional is a type alias for POptional restricted to monomorphic updates:type Optional[S, A] = POptional[S, S, A, A]
the source of a POptional
the modified source of a POptional
the target of a POptional
the modified target of a POptional
monocle.law.OptionalLaws