Module Support.DynArray

include module type of DynArray
type 'a t
exception Invalid_arg of int * string * string
val create : unit -> 'a t
val make : int -> 'a t
val init : int -> (int -> 'a) -> 'a t
val empty : 'a t -> bool
val length : 'a t -> int
val get : 'a t -> int -> 'a
val last : 'a t -> 'a
val set : 'a t -> int -> 'a -> unit
val insert : 'a t -> int -> 'a -> unit
val add : 'a t -> 'a -> unit
val append : 'a t -> 'a t -> unit
val delete : 'a t -> int -> unit
val delete_last : 'a t -> unit
val delete_range : 'a t -> int -> int -> unit
val clear : 'a t -> unit
val blit : 'a t -> int -> 'a t -> int -> int -> unit
val compact : 'a t -> unit
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val enum : 'a t -> 'a Enum.t
val of_list : 'a list -> 'a t
val of_array : 'a array -> 'a t
val of_enum : 'a Enum.t -> 'a t
val copy : 'a t -> 'a t
val sub : 'a t -> int -> int -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold_right : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val index_of : ('a -> bool) -> 'a t -> int
val filter : ('a -> bool) -> 'a t -> unit
type resizer_t = currslots:int -> oldlength:int -> newlength:int -> int
val set_resizer : 'a t -> resizer_t -> unit
val get_resizer : 'a t -> resizer_t
val default_resizer : resizer_t
val exponential_resizer : resizer_t
val step_resizer : int -> resizer_t
val conservative_exponential_resizer : resizer_t
val unsafe_get : 'a t -> int -> 'a
val unsafe_set : 'a t -> int -> 'a -> unit
val append_list : 'a t -> 'a list -> unit

append_list dst l effectfully appends all the elements of l to dst.

val head : 'a t -> 'a option

head d is Some h with h being the first element of d if d is non-empty, and None otherwise.

val get_opt : 'a t -> int -> 'a option

get_opt d i is Some (get d i) if d has an element at index i, and None otherwise.

val rfind_opt_idx : 'a t -> ('a -> bool) -> (int * 'a) option

rfind_opt_idx d p is Some (i, l) where l is the last element in d that satisfies p and i is the index of l in d, and None otherwise.