On Tue, Jun 9, 2009 at 2:52 PM, ptrash<ptr...@web.de> wrote: > > 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 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe