package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

Dune Dependency

Authors

Maintainers

Sources

b0-0.0.5.tbz
sha512=00a6868b4dfa34565d0141b335622a81a0e8d5b9e3c6dfad025dabfa3df2db2a1302b492953bbbce30c3a4406c324fcec25250a00b38f6d18a69e15605e3b07e

doc/b0.std/B0_std/Rqueue/index.html

Module B0_std.Rqueue

Random queue

type 'a t

The type for random queues with elements of type 'a.

val empty : ?rand:Random.State.t -> unit -> 'a t

emtpy ~rand () is an empty random queue using rand as random state (defaults to Random.State.make_self_init).

val add : 'a t -> 'a -> unit

add q v adds v to the queue.

val take : 'a t -> 'a option

take q removes and returns a random element in q (if any).

val length : 'a t -> int

length q is the number of elements in q.

OCaml

Innovation. Community. Security.