thanks for all of your replies.  I will test your code later. Another newbie
question is why has the following code indentation problem ?

rollDice n = do
    let myGen =
        if doesFileExist "/dev/urandom" 
            then betterStdGen
            else (mkStdGen . fromInteger) <$> picoSec
    return $ (take 1 $ randomRs (1,n) myGen) !! 0


Sincerely!

-----
e^(π.i) + 1 = 0
-- 
View this message in context: 
http://haskell.1045720.n5.nabble.com/How-to-write-such-a-code-elegantly-tp3334329p3334379.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to