flatMapTask<C> method

TaskEither<L, C> flatMapTask<C>(
  1. TaskEither<L, C> f(
    1. R r
    )
)

Chain a TaskEither with an IOEither.

Allows to chain a function that returns a Either<L, R> (IOEither) to a function that returns a Future<Either<L, C>> (TaskEither).

Implementation

TaskEither<L, C> flatMapTask<C>(TaskEither<L, C> Function(R r) f) =>
    TaskEither(
      () async => run().match(
        (l) => Either.left(l),
        (r) => f(r).run(),
      ),
    );