map<U> method
Maps the value of a successful Result<T, E> from T
to U
, leaving an
error untouched.
Implementation
Result<U, E> map<U>(U Function(T) f) =>
isOk ? Result.ok(f(_value)) : Result.err(_error);
Maps the value of a successful Result<T, E> from T
to U
, leaving an
error untouched.
Result<U, E> map<U>(U Function(T) f) =>
isOk ? Result.ok(f(_value)) : Result.err(_error);