ok<T2> method
If result
is Err
then returns this Err
as is.
If result
is Ok
then returns result of call f(result.val)
.
Result of call f() must be a value of type T2.
Implementation
Future<Result<T2>> ok<T2>(T2 Function(T) f) async =>
then((resultT) async => Ok(f(resultT.unwrap)));