fold<T> method

Future<T> fold<T>(
  1. FutureOr<T> fnL(
    1. L left
    ),
  2. FutureOr<T> fnR(
    1. R right
    )
)

Fold Left and Right into the value of one type

Implementation

Future<T> fold<T>(
  FutureOr<T> Function(L left) fnL,
  FutureOr<T> Function(R right) fnR,
) {
  return this.then((either) => either.fold(fnL, fnR));
}