package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

dune-project
 Dependency

Authors

Maintainers

Sources

b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0

doc/b0.memo/B0_random_queue/index.html

Module B0_random_queueSource

Random queue

Sourcetype 'a t

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

Sourceval 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).

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

add q v adds v to the queue.

Sourceval take : 'a t -> 'a option

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

Sourceval length : 'a t -> int

length q is the number of elements in q.