import Control.Monad.State tick :: State Int Int tick = modify (+1) >> get tickT :: StateT Int IO Int tickT = modify (+1) >> get >>= liftIO . print >> get main :: IO () main = do print $ runState (tick >> tick >> tick) 0 runStateT (tickT >…
Login to quote this blog
Failed to save quote. Please try again later.
You cannot quote because this article is private.