when<R> abstract method
R
when<R>({
- required R ok(
- T
- required R err(
- E
Invokes either ok
or err
depending on the result.
Identical to match except that the arguments are named.
Implementation
R when<R>({required R Function(T) ok, required R Function(E) err});