This crashed the program if you were very unlucky.
This commit is contained in:
Rnhmjoj 2014-10-17 00:13:12 +02:00
parent 2abb1c9074
commit 8e383dde3f

View File

@ -15,4 +15,4 @@ randPick ys n gen = (x : xs', gen'')
-- Generate k random number in the range [0, n)
randWords :: Int -> Int -> IO [Int]
randWords n k = getStdRandom (randPick [0..n] k)
randWords n k = getStdRandom (randPick [0..n-1] k)