toFuture<L, R> function
Convert a TaskEither into a Future, that throws an error on Left.
Implementation
Future<R> toFuture<L, R>(TaskEither<L, R> taskEither) =>
Future.sync(taskEither.call).then(either.fold(
(_) => Future.error(_ as dynamic),
identity,
));