An Optic
is able to get and set a piece of a whole, possibly failing.
An Optic
is able to get and set a piece of a whole, possibly failing. In
the most general possible case the get and set types are distinct and
getting may fail with a different error than setting.
OpticCompose
abstracts over the different ways that optics can be
composed together, allowing all optics to be composed with a single
operator.
OpticCompose
abstracts over the different ways that optics can be
composed together, allowing all optics to be composed with a single
operator.
An OpticFailure
describes how getting or setting a piece of a whole
using an optic failed.
An OpticFailure
describes how getting or setting a piece of a whole
using an optic failed.
An OpticResult
represents the result from getting or setting a piece of
a whole using an optic.
An OpticResult
represents the result from getting or setting a piece of
a whole using an optic. This allows the library to abstract over pure
optics, transactional optics, and effectual optics.
Constructs an optic result that fails with the specified value.
Constructs an optic result that fails with the specified value.
Constructs an optic result by applying a function that returns an optic result to the success value of the specified optic result.
Constructs an optic result by applying a function that returns an optic result to the success value of the specified optic result.
Constructs an optic results that folds over the success and failure
values of the specified optic result, transforming them with the
functions f
and g
that return an optic result.
Constructs an optic results that folds over the success and failure
values of the specified optic result, transforming them with the
functions f
and g
that return an optic result.
Constructs an optic result by applying a function to the success value of this optic result.
Constructs an optic result by applying a function to the success value of this optic result.
Constructs an optic result that succeeds with the specified value.
Constructs an optic result that succeeds with the specified value.
Constructs an optic result that succeeds with all the success values in the specified collection of optic results, discarding the failures.
Constructs an optic result that succeeds with all the success values in the specified collection of optic results, discarding the failures.
Constructs an optic result that applies a function returning an optic result to each element in the specified collection and collects the results into a single optic result.
Constructs an optic result that applies a function returning an optic result to each element in the specified collection and collects the results into a single optic result.
Constructs an optic result by applying a function to the failure value of this optic result.
Constructs an optic result by applying a function to the failure value of this optic result.
Constructs an optic result that is equal to the left optic result if it is successful or else the right optic result.
Constructs an optic result that is equal to the left optic result if it is successful or else the right optic result.
Constructs an optic result that combines the left and right optic results.
Constructs an optic result that combines the left and right optic results.
Constructs an optic result that combines the left and right optic results, transforming their success values with the specified function.
Constructs an optic result that combines the left and right optic results, transforming their success values with the specified function.