
9 Jun
2009
9 Jun
'09
1:57 p.m.
On Tue, Jun 9, 2009 at 2:52 PM, ptrash
Hmm...it am not getting through it. I just want to generate a random number and then compare it with other numbers. Something like
r = randomRIO (1, 10) if (r > 5) then... else ...
You have to do it inside the IO monad, something like myFunc = do r <- randomRIO (1, 10 if r > 5 then ... else ... /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe