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.