Functional Vectors
Tree with a large branching factor for logarithmic operations with a low multiplicative factor.
status: experimental. DO NOT USE (yet)
Sourcetype 'a sequence = ('a -> unit) -> unit Sourcetype 'a gen = unit -> 'a option Sourcetype 'a ktree = unit -> [ `Nil | `Node of 'a * 'a ktree list ] Signature
Sourceval get : int -> 'a t -> 'a option Sourceval get_exn : int -> 'a t -> 'a Sourceval pop : 'a t -> ('a * 'a t) option Sourceval iter : f:('a -> unit) -> 'a t -> unit Sourceval iteri : f:(int -> 'a -> unit) -> 'a t -> unit Iterate on elements with their index, in increasing order.
Sourceval iteri_rev : f:(int -> 'a -> unit) -> 'a t -> unit Iterate on elements with their index, but starting from the end.
Sourceval fold : f:('b -> 'a -> 'b) -> x:'b -> 'a t -> 'b Sourceval foldi : f:('b -> int -> 'a -> 'b) -> x:'b -> 'a t -> 'b Sourceval map : ('a -> 'b) -> 'a t -> 'b t Sourceval choose : 'a t -> 'a option Conversions
Sourceval to_list : 'a t -> 'a list Sourceval of_list : 'a list -> 'a t Sourceval add_list : 'a t -> 'a list -> 'a t IO