would love someone to send me a better implementation of the
Random library. Preferably someone who understands the pitfalls.
Simon
| -Original Message-
| From: Ian Lynagh [mailto:[EMAIL PROTECTED]]
| Sent: 29 November 2001 15:32
| To: [EMAIL PROTECTED]
| Subject: Confused about Random
|
|
With the following module:
module Main where
import Random
data Foo = Foo StdGen
main :: IO()
main = do let rs = randoms (Foo (mkStdGen 39)) :: [Int]
rRs = randomRs (0,9) (Foo (mkStdGen 39)) :: [Int]
putStrLn $ show $ take 100 rs