alea/Alea/Random.hs

7 lines
162 B
Haskell
Raw Normal View History

2014-10-14 18:09:58 +02:00
module Alea.Random where
2014-10-13 21:26:55 +02:00
2014-10-20 16:54:23 +02:00
import Crypto.Threefish.Random
2014-10-13 21:26:55 +02:00
randWords :: Int -> Int -> IO [Int]
2014-10-20 17:32:36 +02:00
randWords n k = newSkeinGen >>= return . take k . randomRs (0, n-1)