[Haskell-cafe] How to write such a code elegantly ?
z_axis at 163.com
Mon Jan 10 03:25:35 CET 2011
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"
else (mkStdGen . fromInteger) <$> picoSec
return $ (take 1 $ randomRs (1,n) myGen) !! 0
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.
More information about the Haskell-Cafe