containers.data
Make.Array
The module type of Array for this ring buffer
containers
containers.iter
containers.monomorphic
containers.sexp
containers.thread
containers.top
containers.unix
type elt = X.t
The element type
type t = X.t array
The type of an array instance
val dummy : elt
A dummy element used for empty slots in the array
val create : int -> t
Make an array of the given size, filled with dummy elements.
val length : t -> int
length t gets the total number of elements currently in t.
length t
t
val get : t -> int -> elt
get t i gets the element at position i.
get t i
i
val set : t -> int -> elt -> unit
set t i e sets the element at position i to e.
set t i e
e
val sub : t -> int -> int -> t
sub t i len gets the sub-array of t from position i to i + len.
sub t i len
i + len
val copy : t -> t
copy t makes a fresh copy of the array t.
copy t
val blit : t -> int -> t -> int -> int -> unit
blit t s arr i len copies len elements from arr starting at i to position s from t.
blit t s arr i len
len
arr
s
val iter : (elt -> unit) -> t -> unit
iter f t iterates over the array t invoking f with the current element, in array order.
iter f t
f