diff options
Diffstat (limited to 'Fallen/Util.hs')
-rw-r--r-- | Fallen/Util.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Fallen/Util.hs b/Fallen/Util.hs index dd01fff..bf528c2 100644 --- a/Fallen/Util.hs +++ b/Fallen/Util.hs | |||
@@ -3,6 +3,6 @@ module Fallen.Util | |||
3 | ) where | 3 | ) where |
4 | import System.Random | 4 | import System.Random |
5 | 5 | ||
6 | randomSetElement rg set = do | 6 | randomSetElement set = do |
7 | let (index,rg') = randomR (0,length set - 1) rg :: (Int,StdGen) | 7 | index <- randomRIO (0, length set - 1) |
8 | (set !! index, rg') \ No newline at end of file | 8 | return $ set !! index \ No newline at end of file |