For the code below, if I CNTL-C after the list is printed, and run it again, I get a different list of colors, each time. This doesn't seem to be happening with my earlier example. Michael ============= import System.Random import Data.Ord data Color = Red | Blue | Green | Yellow | Orange | Brown deriving (Show, Read, Eq, Enum, Ord, Bounded) main = do gen <- getStdGen let code = map toEnum $ take 4 $ randomRs (0,5) gen :: [Color] putStrLn $ "List is " ++ show code guessString <- getLine newGen <- newStdGen main --- On Sun, 10/11/09, Felipe Lessa <felipe.lessa@gmail.com> wrote:
|