when<R> method
R
when<R>({
- required R some(
- T
- required R none(),
inherited
Invokes either some
or none
depending on the option.
Identical to match except that the arguments are named.
Implementation
R when<R>({required R Function(T) some, required R Function() none}) {
return match(some, none);
}