Module BatVect.Labels

module Labels: sig .. end

Operations on BatVect with labels.

This module overrides a number of functions of BatVect by functions in which some arguments require labels. These labels are there to improve readability and safety and to let you change the order of arguments to functions. In every case, the behavior of the function is identical to that of the corresponding function of BatVect.


val init : int -> f:(int -> 'a) -> 'a BatVect.t
val get : 'a BatVect.t -> n:int -> 'a
val at : 'a BatVect.t -> n:int -> 'a
val set : 'a BatVect.t -> n:int -> elem:'a -> 'a BatVect.t
val modify : 'a BatVect.t -> n:int -> f:('a -> 'a) -> 'a BatVect.t
val destructive_set : 'a BatVect.t -> n:int -> elem:'a -> unit
val sub : 'a BatVect.t -> m:int -> n:int -> 'a BatVect.t
val insert : n:int -> sub:'a BatVect.t -> 'a BatVect.t -> 'a BatVect.t
val remove : m:int -> n:int -> 'a BatVect.t -> 'a BatVect.t
val iter : f:('a -> unit) -> 'a BatVect.t -> unit
val iteri : f:(int -> 'a -> unit) -> 'a BatVect.t -> unit
val rangeiter : f:('a -> unit) -> m:int -> n:int -> 'a BatVect.t -> unit
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a BatVect.t -> 'b
val fold : f:('b -> 'a -> 'b) -> init:'b -> 'a BatVect.t -> 'b
val reduce : f:('a -> 'a -> 'a) -> 'a BatVect.t -> 'a
val fold_right : f:('a -> 'b -> 'b) -> 'a BatVect.t -> init:'b -> 'b
val foldi : f:(int -> 'b -> 'a -> 'b) -> init:'b -> 'a BatVect.t -> 'b
val map : f:('a -> 'b) -> 'a BatVect.t -> 'b BatVect.t
val mapi : f:(int -> 'a -> 'b) -> 'a BatVect.t -> 'b BatVect.t
val for_all : f:('a -> bool) -> 'a BatVect.t -> bool
val exists : f:('a -> bool) -> 'a BatVect.t -> bool
val find : f:('a -> bool) -> 'a BatVect.t -> 'a
val mem : elem:'a -> 'a BatVect.t -> bool
val memq : elem:'a -> 'a BatVect.t -> bool
val findi : f:('a -> bool) -> 'a BatVect.t -> int
val filter : f:('a -> bool) -> 'a BatVect.t -> 'a BatVect.t
val filter_map : f:('a -> 'b option) -> 'a BatVect.t -> 'b BatVect.t
val find_all : f:('a -> bool) -> 'a BatVect.t -> 'a BatVect.t
val partition : f:('a -> bool) -> 'a BatVect.t -> 'a BatVect.t * 'a BatVect.t