[Haskell-cafe] Re: Monad.Reader with updates

Mauricio briqueabraque at yahoo.com
Thu Nov 6 06:52:16 EST 2008

>> Is there some abstraction in current ghc library
>> that implements something like Reader, but where
>> the value of the environment is updated at every
>> "step"?
> do-it-yourself? you can start from reader definition and add what you
> need. you just need to make "initial state" consisting from state
> itself and update function so `run` will have just one initialization argument

Sure. I've done a few versions, trying to change
the way (>>=) is defined, and learned a lot with
that. But I wanted to know if there's already the
"right way to do it" instead of my "newbie way to
do it" :)


More information about the Haskell-Cafe mailing list