
29 Apr
2014
29 Apr
'14
8:24 p.m.
On Mon, Apr 28, 2014 at 09:36:02PM +0100, Niklas Hambüchen wrote:
Code like
flip execState 0 (forever $ modify (+1))
leaks memory as hell, and gets fixed by using
x <- get put $! x + 1
I propose the addition of modify' to Control.Monad.State.Strict.
transformers-0.4 has modify' for both state monads -- it's useful for both.