Reason
  • Docs
  • Try
  • API
  • Community
  • Blog
  • Languages iconEnglish
    • 日本語
    • Deutsch
    • Español
    • Français
    • 한국어
    • Português (Brasil)
    • Русский
    • Українська
    • 中文
    • 繁體中文
    • Help Translate
  • GitHub
 Up  

Module Random.State

module State: sig .. end

type t;
The type of PRNG states.
let make: array(int) => t;
Create a new state and initialize it with the given seed.
let make_self_init: unit => t;
Create a new state and initialize it with a system-dependent low-entropy seed.
let copy: t => t;
Return a copy of the given state.
let bits: t => int;
let int: (t, int) => int;
let int32: (t, Int32.t) => Int32.t;
let nativeint: (t, Nativeint.t) => Nativeint.t;
let int64: (t, Int64.t) => Int64.t;
let float: (t, float) => float;
let bool: t => bool;
These functions are the same as the basic functions, except that they use (and update) the given PRNG state instead of the default one.