Effect CommunityEC
Effect Communityβ€’3y agoβ€’
43 replies
addamsson

Equivalent of `ReaderTaskEither.ask` in Effect

What is the equivalent of ReaderTaskEither.ask in Effect? I'm trying to access the context (R type paramerter in Effect) of my operation in an Effect.Do.pipe:
Effect.Do.pipe(
    Effect.bind("context", () => input),
    Effect.bind("deps", () => Effect.ask<R>()), 
                                     ^^^--- πŸ‘ˆ not there
    Effect.flatMap(({ context, deps }) => {
//...

but I realized that there is no ask in Effect or anything else in the list of functions that would return an Effect<R, E, R>
Was this page helpful?