about summary refs log tree commit diff stats
path: root/Fallen/Util.hs
blob: dd01fff91728843814c8be8ea6678475715489a9 (plain) (blame)
1
2
3
4
5
6
7
8
module Fallen.Util
( randomSetElement
) where
  import System.Random
  
  randomSetElement rg set = do
    let (index,rg') = randomR (0,length set - 1) rg :: (Int,StdGen)
    (set !! index, rg')