map<A> method

  1. @override
Result<A, E> map<A>(
  1. A f(
    1. T t
    )
)
override

Maps a Result<T, E> to Result<U, E> by applying a function to a contained Ok value, leaving an Err value untouched.

@param f The function to apply an OK value

@returns the result of applying f or an Err untouched

Implementation

@override
Result<A, E> map<A>(A Function(T t) f) => ok(f(this.value));