>>> replicate 0 True [] >>> replicate (-1) True [] >>> replicate 4 True [True,True,True,True]
>>> import Control.Monad.State >>> runState (replicateM 3 $ state $ \s -> (s, s + 1)) 1 ([1,2,3],4)
>>> replicateM_ 3 (putStrLn "a") a a a