boblettoj <[email protected]> writes:

> I was using a do loop to try and create a generator before using it in the
> randomR call, is there a better way to do this? 

Use newStdGen in IO, then pass it around everywhere.


> randoms and randomRs return lists whereas i just want a single number.
> thanks

OK, I thought you were doing something with random ordering of lists
(note that if you want to shuffle some lists, there is a package on
Hackage that implements Oleg's perfect shuffling function).

-- 
Ivan Lazar Miljenovic
[email protected]
IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to