A simple implementation of a pure linear congruential psuedo-random number generator.

Example of use:

main = do let seed = 1 let (r, seed') = randomInt seed putStrLn ("Random number 1: " ++ show r) let (r', seed'') = randomInt seed' putStrLn ("Random number 2: " ++ show r') putStrLn ("Random int list: " ++ show (randomInts 10 seed)) putStrLn ("Shuffled list: " ++ show (shuffle [1..10] seed))

# Documentation

randomInts :: Seed -> Int -> [Int]Source