3 ms·
So A reader Monad is similar to class inheritance. Where you provide a dependency ( like a inner class ). The resulting class can also have other variables and
by wrong_variable 10y ago
So A reader Monad is similar to class inheritance. Where you provide a dependency ( like a inner class ).
The resulting class can also have other variables and inputs.
Is that a correct analogy ?
- greydius 10y agoI think a better analogy with OO languages would be a Function object for which you've provided one of the arguments in its constructor. Inheritance is more similar to monad transformers.