I'm trying to understand what is Haskell Reader monad, but I struggle with this part in the book:
The “read-only” nature of the type argument
rmeans that you can swap in a different type or value ofrfor functions that you call, but not for functions that call you. The best way to demonstrate this is with thewithReaderTfunction which lets us start a newReadercontext with a different argument being provided:withReaderT :: (r' -> r) -- ^ The function to modify the environment. -> ReaderT r m a -- ^ Computation to run in the modified environment. -> ReaderT r' m a
So, first of all, could you please specify what to consider "a function that you call" and what to consider "a function that call you"?