fp-ts-std icon indicating copy to clipboard operation
fp-ts-std copied to clipboard

ReaderIO asksIO

Open samhh opened this issue 3 years ago • 3 comments

And others.

samhh avatar Nov 03 '21 22:11 samhh

What would be the use case for asksIO? 🤔 Just a stricter R.asks? e.g export const asksIO: <R1, A>(f: (r1: R1) => IO.IO<A>) => RIO.ReaderIO<R1, A> = R.asks

Would you mind expanding on the and others? 😝 Are you looking for asksTaskEither on RTE and similar operations?

stefanoCrmg avatar Aug 10 '22 11:08 stefanoCrmg

It's been a while! Let's think.

I think if you're in a stacked monadic context like ReaderIO it's ideal if everything you need exists in that module/namespace. Additionally I think R.asks only works there by relying on an implementation detail in how fp-ts represents stacked monads.

I suspect that's indeed what I meant by "and others". The same would apply to every ReaderT-based type.

samhh avatar Aug 18 '22 12:08 samhh

Blocked awaiting fp-ts 2.13.

samhh avatar Sep 09 '22 18:09 samhh

922f0bad63524adecb0fbcb0b128cb9bd1772ff1..355d472c36e359d3b51221ae1ae61956372bcb77

samhh avatar Apr 07 '23 13:04 samhh