package batteries

  1. Overview
  2. Docs
A community-maintained standard library extension

Install

Dune Dependency

Authors

Maintainers

Sources

v3.5.1.tar.gz
md5=d3d16ffc960e832a1c0e21b7123194e9
sha512=36c8561079aa9fefc864c2f03bd8ae20aa05987bb67e7a9beac3ab4f440dbf7d44f141c172b05fddb1a5b618fc55a27962bb45fc39bd7b3a15d56e0ed3ff3870

doc/batteries.unthreaded/BatVect/Make/Labels/index.html

Module Make.Labels

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

Innovation. Community. Security.