doTaskEither<L, R> function
Implementation
TaskEither<L, R> doTaskEither<L, R>(
Future<R> Function(
Future<A> Function<A>(TaskEither<L, A>),
) f,
) =>
() async {
try {
return Right(
await f(
<A>(either) async => switch (await either()) {
Right(value: final value) => value,
Left(value: final value) => throw _EvalException(value)
},
),
);
} on _EvalException<L> catch (e) {
return Left(e.value);
}
};