This sounds a lot like the reader monad. Take a look at this implementation. Maybe that's what you're looking for, or maybe you can use it as a base for what you want to do.
Wow per your recommendation, I've been playing around with crocs it seems like a really useful library and there is much to learn from it, I think there's a lot here to work with and possibly build on. It does lack TypeScript support though 😭. Thank you so much for the recomendation!
Right... typescript. I don't know much about it but I understand that these FP patterns are not easy to do with typescript. But anyway, might want to take a look at fp-ts.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This sounds a lot like the reader monad. Take a look at this implementation. Maybe that's what you're looking for, or maybe you can use it as a base for what you want to do.
Wow per your recommendation, I've been playing around with
crocs
it seems like a really useful library and there is much to learn from it, I think there's a lot here to work with and possibly build on. It does lack TypeScript support though 😭. Thank you so much for the recomendation!Right... typescript. I don't know much about it but I understand that these FP patterns are not easy to do with typescript. But anyway, might want to take a look at fp-ts.