From 94fc90c32fb9d6694a95a9c191553aa39eabd10a Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 2 Apr 2013 01:57:09 -0400 Subject: Got rid of pure functional randomness and started using IO monad --- Fallen/Util.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Fallen/Util.hs') 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 ) where import System.Random - randomSetElement rg set = do - let (index,rg') = randomR (0,length set - 1) rg :: (Int,StdGen) - (set !! index, rg') \ No newline at end of file + randomSetElement set = do + index <- randomRIO (0, length set - 1) + return $ set !! index \ No newline at end of file -- cgit 1.4.1