Iavor Diatchki wrote:
The state transformer inherits its behavior from
the underlying monad.

Ross Paterson wrote:
This (like StateT) gives you strictness in the pair, but doesn't give
the strictness in the state that the original poster wanted.

I think it does - if you run his program with State Int
replaced by StateT Int Identity, it now runs in constant memory.

Once we have this kind of strictness, then the programmer
has control over the state.

That is true for MTL as well.

Regards,
Yitz
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to