package ringo

  1. Overview
  2. Docs

Parameters

Signature

type t
type v = V.t
val create : int -> t

create size inizialize an empty ring

val add : t -> v -> unit

add t v add a value to the ring. If the ring already contains size elements, the first element is removed and v is added.

val add_and_return_erased : t -> v -> v option
val mem : t -> v -> bool

mem t v check if v is in the ring. O(1)

val remove : t -> v -> unit

remove t v remove one element from the table

val clear : t -> unit

retest t remore all bindings from the current ring

val elements : t -> v list

elements t return the list of elements currently in the ring

OCaml

Innovation. Community. Security.