package binsec

  1. Overview
  2. Docs
On This Page
  1. Timing
Legend:
Library
Module
Module type
Parameter
Class
Class type

Generic utilities

val get_opt_or_default : 'a -> 'a option -> 'a

Option types

get_opt_or_default default vopt returns default if vopt is None, the contents of vopt otherwise

val unsafe_get_opt : 'a option -> 'a

unsafe_get_opt vopt retrieves the contents of vopt. Raise Assert_failure if vopt is None.

val is_none : 'a option -> bool

is_none vopt tests if vopt is indeed None.

Timing

val time : (unit -> 'a) -> float * 'a

time f times the execution of function f and returns both the time taken and the result

val random_max_int : unit -> int

random_max_int () generates a random number between 0 and 2^30 - 1. This second value is the maximum accepted by Random.int.

OCaml

Innovation. Community. Security.