mapFuture<R> method

Future<Validation<R>> mapFuture<R>(
  1. Future<R> f(
    1. T t
    )
)

Implementation

Future<Validation<R>> mapFuture<R>(Future<R> Function(T t) f) =>
    foldFuture((err) => Invalid<R>(err).toFuture(),
               (v)   => f(v!).then((value) => Valid(value)));