foldAsync<U extends Object, F extends Object> abstract method

Future<Result<U, F>> foldAsync<U extends Object, F extends Object>(
  1. Future<U> ok(
    1. T
    ),
  2. Future<F> err(
    1. E
    )
)

Asynchronously invoke either the ok or the err function based on the result.

This is a combination of the map() and mapErr() functions.

Implementation

Future<Result<U, F>> foldAsync<U extends Object, F extends Object>(
  Future<U> Function(T) ok,
  Future<F> Function(E) err,
);