package batteries

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Operations on BatArray.Cap with labels.

val init : int -> f:(int -> 'a) -> ('a, _) t
val make : int -> init:'a -> ('a, _) t
val create : int -> init:'a -> ('a, _) t
val make_matrix : dimx:int -> dimy:int -> 'a -> (('a, _) t, _) t
val create_matrix : dimx:int -> dimy:int -> 'a -> (('a, _) t, _) t
val sub : ('a, [> `Read ]) t -> pos:int -> len:int -> ('a, _) t
val fill : ('a, [> `Write ]) t -> pos:int -> len:int -> 'a -> unit
val blit : src:('a, [> `Read ]) t -> src_pos:int -> dst:('a, [> `Write ]) t -> dst_pos:int -> len:int -> unit
val iter : f:('a -> unit) -> ('a, [> `Read ]) t -> unit
val iteri : f:(int -> 'a -> unit) -> ('a, [> `Read ]) t -> unit
val modify : f:('a -> 'a) -> ('a, [ `Read | `Write ]) t -> unit
val modifyi : f:(int -> 'a -> 'a) -> ('a, [ `Read | `Write ]) t -> unit
val fold_left : f:('a -> 'b -> 'a) -> init:'a -> ('b, [> `Read ]) t -> 'a
val fold : f:('a -> 'b -> 'a) -> init:'a -> ('b, [> `Read ]) t -> 'a
val fold_right : f:('b -> 'a -> 'a) -> ('b, [> `Read ]) t -> init:'a -> 'a
val fold_while : p:('acc -> 'a -> bool) -> f:('acc -> 'a -> 'acc) -> init:'acc -> 'a array -> 'acc * int
val sort : cmp:('a -> 'a -> int) -> ('a, [> `Read | `Write ]) t -> unit
val stable_sort : cmp:('a -> 'a -> int) -> ('a, [ `Read | `Write ]) t -> unit
val fast_sort : cmp:('a -> 'a -> int) -> ('a, [ `Read | `Write ]) t -> unit
val iter2 : f:('a -> 'b -> unit) -> ('a, [> `Read ]) t -> ('b, [> `Read ]) t -> unit
val iter2i : f:(int -> 'a -> 'b -> unit) -> ('a, [> `Read ]) t -> ('b, [> `Read ]) t -> unit
val exists : f:('a -> bool) -> ('a, [> `Read ]) t -> bool
val for_all : f:('a -> bool) -> ('a, [> `Read ]) t -> bool
val find : f:('a -> bool) -> ('a, [> `Read ]) t -> 'a
val map : f:('a -> 'b) -> ('a, [> `Read ]) t -> ('b, _) t
val mapi : f:(int -> 'a -> 'b) -> ('a, [> `Read ]) t -> ('b, _) t
val filter : f:('a -> bool) -> ('a, [> `Read ]) t -> ('a, _) t
val filter_map : f:('a -> 'b option) -> ('a, [> `Read ]) t -> ('b, _) t
val count_matching : f:('a -> bool) -> ('a, [> `Read ]) t -> int
OCaml

Innovation. Community. Security.