Containers_pvecFunctional Vectors.
These are trees with a large branching factor for logarithmic operations with a low multiplicative factor.
status: experimental
val empty : 'a tEmpty vector.
val is_empty : _ t -> boolIs the vector empty?
val return : 'a -> 'a tSingle element vector.
val length : _ t -> intNumber of elements. Constant time.
val make : int -> 'a -> 'a tmake n x makes a vector with n copies of the element x
val get : 'a t -> int -> 'aval get_opt : 'a t -> int -> 'a optionval last : 'a t -> 'aLast element.
val last_opt : 'a t -> 'a optionLike pop_opt but doesn't return the last element. Returns the same vector if it's empty.
val iter : ('a -> unit) -> 'a t -> unitval iter_rev : ('a -> unit) -> 'a t -> unitIterate on elements but starting from the end.
val iteri : (int -> 'a -> unit) -> 'a t -> unitIterate on elements with their index, in increasing order.
val iteri_rev : (int -> 'a -> unit) -> 'a t -> unitIterate on elements with their index, but starting from the end.
val fold_left : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'bval fold_rev : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'bval fold_lefti : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'bval fold_revi : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'bappend a b adds all elements of b at the end of a. This is at least linear in the length of b.
val choose : 'a t -> 'a optionReturn an element. It is unspecified which one is returned.
val to_list : 'a t -> 'a listval of_list : 'a list -> 'a tval add_seq : 'a t -> 'a Stdlib.Seq.t -> 'a tval of_seq : 'a Stdlib.Seq.t -> 'a tval to_seq : 'a t -> 'a Stdlib.Seq.t