
6 Nov
2008
6 Nov
'08
12:21 p.m.
Mauricio wrote:
The problem is that I need 'a' or 'b' above to sometimes also change the environment. I think with this method I could not get that.
I no longer understand what you want. I thought you wanted an environment which automatically changed every "step". I showed you how you can do that, although it requires making explicit what a "step" is, which you could do with custom combinators. Now you want any part of the action to change the environment? In this case, use the state monad, not the reader monad. That is what it's for. Jules