fromTask<L, R> function
Transforms a Task into a TaskEither, wrapping the result in an Right.
expect(
await fromTask(T.value('hello'))(),
E.right('hello'),
);
Implementation
TaskEither<L, R> fromTask<L, R>(Task<R> fa) =>
TaskEither(Task(() => fa().flatMap(either.right)));