package ringo

  1. Overview
  2. Docs

Module Ring.MakeTableSource

Parameters

Signature

Sourcetype t
Sourcetype v = V.t
Sourceval create : int -> t

create size inizialize an empty ring

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

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

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

Sourceval remove : t -> v -> unit

remove t v remove one element from the table

Sourceval clear : t -> unit

retest t remore all bindings from the current ring

Sourceval elements : t -> v list

elements t return the list of elements currently in the ring