summaryrefslogtreecommitdiff
path: root/dynarray.sig
blob: 8e2da7cb62ffc734fdac781f70abd026785668f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
signature DYNARRAY = sig
  type 'a t = (int * 'a option Array.array) ref

  val create: int -> 'a t
  val create0: unit -> 'a t

  val length: 'a t -> int

  val push: 'a t -> 'a -> unit
  val get: 'a t -> int -> 'a
  val set: 'a t -> int -> 'a -> unit

  val reset: 'a t -> unit
  val toVec: 'a t -> 'a vector
  val appi: (int * 'a -> unit) -> 'a t -> unit
end