signature RAND structure Rand : RAND
The Rand provides access to the operating system's pseudo-random number generator.
import signature RAND from "x-alice:/lib/system/RAND-sig" import structure Rand from "x-alice:/lib/system/Rand"
signature RAND = sig val rand : unit -> int val srand : int -> unit val randLimits : unit -> int * int end
Returns a pseudo-random integer between lo and hi, where (lo,hi) = randLimits().
Sets the seed for a new sequence of pseudo-random numbers to be returned by rand. These sequences are repeatable by calling srand with the same seed value.
returns the lower and upper bound of the range of numbers that will be returned by rand.