Reader Monad
Noun · Development
Definitions
A monad that threads a shared, read-only environment (such as configuration or dependencies) through a computation without passing it explicitly as a function argument at every call site. Computations use ask to access the environment, and runReader supplies the concrete value. It is essentially a wrapper around (env -> a) with monadic composition.
In plain English: A pattern in functional programming that lets every function in a chain automatically access shared settings or dependencies without passing them around manually.
Example: "We use the Reader monad to inject the database connection pool, so none of our business logic functions take a pool argument directly."