[Haskell-cafe] Random question

Henning Thielemann lemming at henning-thielemann.de
Wed Sep 24 17:25:49 EDT 2008

On Wed, 24 Sep 2008, Iain Barnett wrote:

> Hi,
> I have a function, that produces a random number between two given numbers
> rand :: Int -> Int -> IO Int
> rand low high = getStdRandom (randomR (low,high))

If you only need arbitrary numbers, not really random ones, you should 
stay away from IO:

More information about the Haskell-Cafe mailing list