next up previous contents
Next: MLton.Rlimit Up: MLton Previous: MLton.ProcEnv   Contents

MLton.Random

signature MLTON_RANDOM =
   sig
      val alphaNumString: int -> string
      val rand: unit -> word
      val seed: unit -> word
      val srand: word -> unit
      val useed: unit -> word
   end

alphaNumString n

return a string of length n of random alphanumeric characters.

rand ()

return the next pseudrandom number.

seed ()

return a random word from /dev/random. Useful as an arg to srand.

srand w

set the seed used by rand to w.

useed ()

return a random word from /dev/urandom. Useful as an arg to srand.