Module CCFun_vec
Functional Vectors
type 'a sequence= ('a -> unit) -> unittype 'a gen= unit -> 'a optiontype 'a printer= Stdlib.Format.formatter -> 'a -> unittype 'a ktree= unit -> [ `Nil | `Node of 'a * 'a ktree list ]
Signature
val empty : 'a tval is_empty : _ t -> boolval return : 'a -> 'a tval length : _ t -> intval push : 'a -> 'a t -> 'a tAdd element at the end.
val get : int -> 'a t -> 'a optionval get_exn : int -> 'a t -> 'a- raises Not_found
 if key not present.
val iter : f:('a -> unit) -> 'a t -> unitval iteri : f:(int -> 'a -> unit) -> 'a t -> unitIterate on elements with their index, in increasing order.
val iteri_rev : f:(int -> 'a -> unit) -> 'a t -> unitIterate on elements with their index, but starting from the end.
val fold : f:('b -> 'a -> 'b) -> x:'b -> 'a t -> 'bval foldi : f:('b -> int -> 'a -> 'b) -> x:'b -> 'a t -> 'bval append : 'a t -> 'a t -> 'a tval map : ('a -> 'b) -> 'a t -> 'b tval choose : 'a t -> 'a option