look in System.Random
randomRIO :: (Random a) => (a, a) -> IO a

you can do
randomNumber<-randomRIO (1,30)
 
 
On Sun, Jun 7, 2009 at 3:33 PM, ptrash <ptrash@web.de> wrote:

Hi,

is the are way (or a build in method) in haskell to get a random number from
a number bottom to a number top?

Something like

let randomNumber = random 1 30

to get a random number between 1 and 30.
--
View this message in context: http://www.nabble.com/Random-Number-tp23914474p23914474.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