put
forM_内でStateTモナドに取り組むにはどうすればよいですか?
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
それとも、一緒にもっと良いアプローチがありますか?