29 Apr
2014
29 Apr
'14
1:47 p.m.
+1 * Niklas Hambüchen <mail@nh2.me> [2014-04-28 21:36:02+0100]
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.
This seems useful for the strict state monad and is consistent with similar functions in base (such as modifyIORef').
Discussion period: 2 weeks. _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries