9 Jun
2009
9 Jun
'09
10:33 a.m.
You can not convert an IO Int to Int, or at least, you shouldn't. However, you can do as follows: test :: IO () test = do int <- randomRIO -- or whatever it is called print $ useInt int useInt :: Int -> Int useInt x = x+10 //Tobias 2009/6/9 ptrash <ptrash@web.de>:
Hi,
I am using the System.Random method randomRIO. How can I convert its output to an Int?
Thanks... -- View this message in context: http://www.nabble.com/Convert-IO-Int-to-Int-tp23940249p23940249.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
-- Tobias Olausson tobsan@gmail.com