map<W> method

AsyncEitherExtended<L, W> map<W>(
  1. Future<W> fn(
    1. R r
    )
)

Implementation

AsyncEitherExtended<L, W> map<W>(Future<W> Function(R r) fn) {
  return then(
    (result) => result
        .map(fn)
        .fold((l) => LeftExtended(l), (r) async => RightExtended(await r)),
  );
}