fromTask<S, C, L, R> function

StateReaderTaskEither<S, C, L, R> fromTask<S, C, L, R>(
  1. Task<R> task
)

Transforms a Task into a StateReaderTaskEither, wrapping the result in an Right.

Implementation

StateReaderTaskEither<S, C, L, R> fromTask<S, C, L, R>(Task<R> task) =>
    StateReaderTaskEither(
      (s) => RTE.fromTask(task.chain(T.map((a) => tuple2(a, s)))),
    );