ReaderTaskEither<E, L, R>.fromTask constructor

ReaderTaskEither<E, L, R>.fromTask(
  1. Task<R> task
)

Build a ReaderTaskEither that returns a Right containing the result of running task.

Implementation

factory ReaderTaskEither.fromTask(Task<R> task) => ReaderTaskEither(
      (_) async => Right(await task.run()),
    );