
30 Apr
2014
30 Apr
'14
12:24 a.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.