Hi, Why do I need a 'do' in the code below? Michael ================== import System.Random rollDice :: IO Int rollDice = getStdRandom (randomR (1,6)) rollNDice :: Int -> [IO Int] rollNDice 0 = [] rollNDice n = rollDice : rollNDice (n-1) ================= [michael@localhost ~]$ ghci rnd0 GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. [1 of 1] Compiling Main ( rnd0.hs, interpreted ) Ok, modules loaded: Main. *Main> rollDice Loading package old-locale-1.0.0.1 ... linking ... done. Loading package old-time-1.0.0.1 ... linking ... done. Loading package random-1.0.0.1 ... linking ... done. 6 *Main> rollDice 3 *Main> rollNDice 3 <interactive>:1:0: No instance for (Show (IO Int)) arising from a use of `print' at <interactive>:1:0-10 Possible fix: add an instance declaration for (Show (IO Int)) In a stmt of a 'do' expression: print it *Main> |