在 forM_ 中,我怎么能开始put
在 StateT monad 上工作?
loop :: Integer -> StateT World IO ()
loop passes = do
(scene, b1) <- get
forM_ [1..passes] $ \pass -> do
let b2 = foo b1 pass
-- other stuff --
put (scene, b2) -- this no longer puts into the StateT monad
还是有更好的方法?