ReaderR is a Transformer Type that takes a Monad and allows the caller to embed context that can be accessed during the transformation pipeline. This gives you the ability to inject dependencies or configuration information at runtime.
see mod_test.ts
This is a Deno module available to import from https://nest.land/package/readerT
deps.js
export { default as ReaderT } from 'https://x.nest.land/readerT@0.0.1/mod.js'
- runWith - inject config or dependencies in pipeline
- ask - during pipeline ask for dependencies
- lift - lift a monad into ReaderT
Pull Requests are welcome
MIT
This library was inspired by Crocks ReaderT implementation -
https://crocks.dev/docs/crocks/ReaderT.html