module type Vector =sig
..end
type
atom
type
t
val length : t -> int
val set : t ->
int -> atom -> t
set v i e
updates the element at position i
in v
to e
.
Raise Invalid_argument "index out of bounds"
if i
is outside the range 0 to length v - 1
.
val get : t -> int -> atom
get v i
returns the element at position i
in v
.
Raise Invalid_argument "index out of bounds"
if i
is outside the range 0 to length v - 1
.
val insert : t ->
int -> atom -> t
insert v i e
inserts the element e
at position i
in v
.
Raise Invalid_argument "index out of bounds"
if i
is outside the range 0 to length v
.
val delete : t -> int -> t
delete v i
deletes the element at position i
in v
.
Raise Invalid_argument "index out of bounds"
if i
is outside the range 0 to length v - 1
.