On Wed, 29 Apr 2009, michael rice wrote: > ================== > > import System.Random > > rollDice :: IO Int > rollDice = getStdRandom (randomR (1,6)) > > rollNDice :: Int -> [IO Int] > rollNDice 0 = [] > rollNDice n = rollDice : rollNDice (n-1) replicateM n rollDice http://www.haskell.org/haskellwiki/Avoiding_IO#State_monad