TaskEither<L, R>.fromTask constructor

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

Build a TaskEither from the result of running task.

Same of TaskEither.rightTask

Implementation

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