package feat-core

  1. Overview
  2. Docs

Source file RandomSig.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(******************************************************************************)
(*                                                                            *)
(*                                     Feat                                   *)
(*                                                                            *)
(*                        François Pottier, Inria Paris                       *)
(*                                                                            *)
(*  Copyright Inria. All rights reserved. This file is distributed under the  *)
(*  terms of the MIT license, as described in the file LICENSE.               *)
(******************************************************************************)

(** A subset of the signature of the module {!Stdlib.Random}. *)
module type S = sig

  (** [bits s] returns 30 random bits in a nonnegative integer. *)
  val bits : unit -> int

  (** [int bound] returns a random integer comprised between 0 (inclusive)
      and [bound] (exclusive). [bound] must be greater than 0 and less than
      2{^30}. *)
  val int : int -> int

end