chalmers-lava2000-1.1.1: Hardware description library




next :: RandomGen g => g -> (Int, g)

The next operation returns an Int that is uniformly distributed in the range returned by genRange (including both end points), and a new generator.

split :: RandomGen g => g -> (g, g)

The split operation allows one to obtain two distinct random number generators. This is very useful in functional programs (for example, when passing a random number generator down to recursive calls), but very little work has been done on statistically robust implementations of split ([System.Random, System.Random] are the only examples we know of).