On Wed, Nov 11, 2009 at 1:09 PM, Matthew Pocock
<
matthew.pocock@ncl.ac.uk> wrote:
> Is there a state monad that is strict on the state but lazy on the
> computation? Of course, strictness in the state will force a portion of the
> computation to be run, but there may be significant portions of it which are
> not run. Would there be a way to write a state monad such that it is
> entirely lazy, but then to wrap either the computation or the state in an
> 'eager' strategy datatype which takes care of this in a more flexible
> manner?
I think replacing "put s" with "put $! s" should guarantee that the