Batteries_uni.Array

`sig
external length : 'a array -> int = "%array_length"
external get : 'a array -> int -> 'a = "%array_safe_get"
external set : 'a array -> int -> 'a -> unit = "%array_safe_set"
external make : int -> 'a -> 'a array = "caml_make_vect"
external create : int -> 'a -> 'a array = "caml_make_vect"
val init : int -> (int -> 'a) -> 'a array
val make_matrix : int -> int -> 'a -> 'a array array
val create_matrix : int -> int -> 'a -> 'a array array
val append : 'a array -> 'a array -> 'a array
val concat : 'a array list -> 'a array
val sub : 'a array -> int -> int -> 'a array
val copy : 'a array -> 'a array
val fill : 'a array -> int -> int -> 'a -> unit
val blit : 'a array -> int -> 'a array -> int -> int -> unit
val to_list : 'a array -> 'a list
val of_list : 'a list -> 'a array
val iter : ('a -> unit) -> 'a array -> unit
val map : ('a -> 'b) -> 'a array -> 'b array
val iteri : (int -> 'a -> unit) -> 'a array -> unit
val mapi : (int -> 'a -> 'b) -> 'a array -> 'b array
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a
val fold_right : ('a -> 'b -> 'b) -> 'a array -> 'b -> 'b
val sort : ('a -> 'a -> int) -> 'a array -> unit
val stable_sort : ('a -> 'a -> int) -> 'a array -> unit
val fast_sort : ('a -> 'a -> int) -> 'a array -> unit
external unsafe_get : 'a array -> int -> 'a = "%array_unsafe_get"
external unsafe_set : 'a array -> int -> 'a -> unit = "%array_unsafe_set"
type 'a t = 'a array
type 'a enumerable = 'a t
type 'a mappable = 'a t
val map : ('a -> 'b) -> 'a mappable -> 'b mappable
val modify : ('a -> 'a) -> 'a array -> unit
val modifyi : (int -> 'a -> 'a) -> 'a array -> unit
val fold_lefti : ('a -> int -> 'b -> 'a) -> 'a -> 'b array -> 'a
val reduce : ('a -> 'a -> 'a) -> 'a array -> 'a
val max : 'a array -> 'a
val min : 'a array -> 'a
val iter2 : ('a -> 'b -> unit) -> 'a array -> 'b array -> unit
val iter2i : (int -> 'a -> 'b -> unit) -> 'a array -> 'b array -> unit
val for_all2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool
val exists2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool
val map2 : ('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array
val for_all : ('a -> bool) -> 'a array -> bool
val exists : ('a -> bool) -> 'a array -> bool
val find : ('a -> bool) -> 'a array -> 'a
val mem : 'a -> 'a array -> bool
val memq : 'a -> 'a array -> bool
val findi : ('a -> bool) -> 'a array -> int
val filter : ('a -> bool) -> 'a array -> 'a array
val filteri : (int -> 'a -> bool) -> 'a array -> 'a array
val filter_map : ('a -> 'b option) -> 'a array -> 'b array
val find_all : ('a -> bool) -> 'a array -> 'a array
val partition : ('a -> bool) -> 'a array -> 'a array * 'a array
val rev : 'a array -> 'a array
val rev_in_place : 'a array -> unit
val enum : 'a array -> 'a BatEnum.t
val of_enum : 'a BatEnum.t -> 'a array
val backwards : 'a array -> 'a BatEnum.t
val of_backwards : 'a BatEnum.t -> 'a array
val make_compare : ('a -> 'a -> int) -> 'a array -> 'a array -> int
val decorate_stable_sort : ('a -> 'b) -> 'a array -> 'a array
val decorate_fast_sort : ('a -> 'b) -> 'a array -> 'a array
val range : 'a array -> int BatEnum.t
val insert : 'a array -> 'a -> int -> 'a array
val t_printer : 'a BatValue_printer.t -> 'a t BatValue_printer.t
val print :
?first:string ->
?last:string ->
?sep:string ->
('a BatIO.output -> 'b -> unit) -> 'a BatIO.output -> 'b t -> unit
val sprint :
?first:string ->
?last:string ->
?sep:string -> ('a BatIO.output -> 'b -> unit) -> 'b t -> string
module Exceptionless :
sig
val find : ('a -> bool) -> 'a t -> 'a option
val findi : ('a -> bool) -> 'a t -> int option
end
module Labels :
sig
val init : int -> f:(int -> 'a) -> 'a array
val create : int -> init:'a -> 'a array
val make_matrix : dimx:int -> dimy:int -> 'a -> 'a array array
val create_matrix : dimx:int -> dimy:int -> 'a -> 'a array array
val sub : 'a array -> pos:int -> len:int -> 'a array
val fill : 'a array -> pos:int -> len:int -> 'a -> unit
val blit :
src:'a array ->
src_pos:int -> dst:'a array -> dst_pos:int -> len:int -> unit
val iter : f:('a -> unit) -> 'a array -> unit
val iteri : f:(int -> 'a -> unit) -> 'a array -> unit
val modify : f:('a -> 'a) -> 'a array -> unit
val modifyi : f:(int -> 'a -> 'a) -> 'a array -> unit
val fold_left : f:('a -> 'b -> 'a) -> init:'a -> 'b array -> 'a
val fold_right : f:('a -> 'b -> 'b) -> 'a array -> init:'b -> 'b
val sort : cmp:('a -> 'a -> int) -> 'a array -> unit
val stable_sort : cmp:('a -> 'a -> int) -> 'a array -> unit
val fast_sort : cmp:('a -> 'a -> int) -> 'a array -> unit
val iter2 : f:('a -> 'b -> unit) -> 'a t -> 'b t -> unit
val exists : f:('a -> bool) -> 'a t -> bool
val for_all : f:('a -> bool) -> 'a t -> bool
val iter2i : f:(int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit
val find : f:('a -> bool) -> 'a t -> 'a
val findi : f:('a -> bool) -> 'a t -> int
val map : f:('a -> 'b) -> 'a t -> 'b t
val mapi : f:(int -> 'a -> 'b) -> 'a t -> 'b t
val filter : f:('a -> bool) -> 'a t -> 'a t
val filter_map : f:('a -> 'b option) -> 'a t -> 'b t
module LExceptionless :
sig
val find : f:('a -> bool) -> 'a t -> 'a option
val findi : f:('a -> bool) -> 'a t -> int option
end
end
module Cap :
sig
type ('a, 'b) t = ('a, 'b) BatArray.Cap.t
constraint 'b = [< `Read | `Write ]
external length : ('a, [< `Read | `Write ]) t -> int = "%array_length"
external get : ('a, [< `Read | `Write > `Read ]) t -> int -> 'a
= "%array_safe_get"
external set :
('a, [< `Read | `Write > `Write ]) t -> int -> 'a -> unit
= "%array_safe_set"
external make : int -> 'a -> ('a, [< `Read | `Write ]) t
= "caml_make_vect"
external create : int -> 'a -> ('a, [< `Read | `Write ]) t
= "caml_make_vect"
external of_array : 'a array -> ('a, [< `Read | `Write ]) t
= "%identity"
external to_array : ('a, [ `Read | `Write ]) t -> 'a array
= "%identity"
external read_only :
('a, [< `Read | `Write > `Read ]) t -> ('a, [ `Read ]) t
= "%identity"
external write_only :
('a, [< `Read | `Write > `Write ]) t -> ('a, [ `Write ]) t
= "%identity"
val init : int -> (int -> 'a) -> ('a, [< `Read | `Write ]) t
val make_matrix :
int ->
int -> 'a -> (('a, [< `Read | `Write ]) t, [< `Read | `Write ]) t
val create_matrix :
int ->
int -> 'a -> (('a, [< `Read | `Write ]) t, [< `Read | `Write ]) t
val iter : ('a -> unit) -> ('a, [< `Read | `Write > `Read ]) t -> unit
val map :
('a -> 'b) ->
('a, [< `Read | `Write > `Read ]) t -> ('b, [< `Read | `Write ]) t
val iteri :
(int -> 'a -> unit) -> ('a, [< `Read | `Write > `Read ]) t -> unit
val mapi :
(int -> 'a -> 'b) ->
('a, [< `Read | `Write > `Read ]) t -> ('b, [< `Read | `Write ]) t
val modify : ('a -> 'a) -> ('a, [ `Read | `Write ]) t -> unit
val modifyi : (int -> 'a -> 'a) -> ('a, [ `Read | `Write ]) t -> unit
val fold_left :
('a -> 'b -> 'a) -> 'a -> ('b, [< `Read | `Write > `Read ]) t -> 'a
val fold_right :
('a -> 'b -> 'b) -> ('a, [< `Read | `Write > `Read ]) t -> 'b -> 'b
val iter2 :
('a -> 'b -> unit) ->
('a, [< `Read | `Write > `Read ]) t ->
('b, [< `Read | `Write > `Read ]) t -> unit
val iter2i :
(int -> 'a -> 'b -> unit) ->
('a, [< `Read | `Write > `Read ]) t ->
('b, [< `Read | `Write > `Read ]) t -> unit
val for_all :
('a -> bool) -> ('a, [< `Read | `Write > `Read ]) t -> bool
val exists :
('a -> bool) -> ('a, [< `Read | `Write > `Read ]) t -> bool
val find : ('a -> bool) -> ('a, [< `Read | `Write > `Read ]) t -> 'a
val mem : 'a -> ('a, [< `Read | `Write > `Read ]) t -> bool
val memq : 'a -> ('a, [< `Read | `Write > `Read ]) t -> bool
val findi : ('a -> bool) -> ('a, [< `Read | `Write > `Read ]) t -> int
val filter :
('a -> bool) ->
('a, [< `Read | `Write > `Read ]) t -> ('a, [< `Read | `Write ]) t
val filter_map :
('a -> 'b option) ->
('a, [< `Read | `Write > `Read ]) t -> ('b, [< `Read | `Write ]) t
val find_all :
('a -> bool) ->
('a, [< `Read | `Write > `Read ]) t -> ('a, [< `Read | `Write ]) t
val partition :
('a -> bool) ->
('a, [< `Read | `Write > `Read ]) t ->
('a, [< `Read | `Write ]) t * ('a, [< `Read | `Write ]) t
val rev :
('a, [< `Read | `Write > `Read ]) t -> ('a, [< `Read | `Write ]) t
val rev_in_place : ('a, [ `Read | `Write ]) t -> unit
val append :
('a, [< `Read | `Write > `Read ]) t ->
('a, [< `Read | `Write > `Read ]) t -> ('a, [< `Read | `Write ]) t
val concat :
('a, [< `Read | `Write > `Read ]) t list ->
('a, [< `Read | `Write ]) t
val sub :
('a, [< `Read | `Write > `Read ]) t ->
int -> int -> ('a, [< `Read | `Write ]) t
val copy : ('a, [< `Read | `Write > `Read ]) t -> 'a array
val fill :
('a, [< `Read | `Write > `Write ]) t -> int -> int -> 'a -> unit
val blit :
('a, [< `Read | `Write > `Read ]) t ->
int -> ('a, [< `Read | `Write > `Write ]) t -> int -> int -> unit
val enum : ('a, [< `Read | `Write > `Read ]) t -> 'a BatEnum.t
val of_enum : 'a BatEnum.t -> ('a, [< `Read | `Write ]) t
val backwards : ('a, [< `Read | `Write > `Read ]) t -> 'a BatEnum.t
val of_backwards : 'a BatEnum.t -> ('a, [< `Read | `Write ]) t
val to_list : ('a, [< `Read | `Write > `Read ]) t -> 'a list
val of_list : 'a list -> ('a, [< `Read | `Write ]) t
val make_compare :
('a -> 'a -> int) ->
('a, [< `Read | `Write > `Read ]) t ->
('a, [< `Read | `Write > `Read ]) t -> int
val sort : ('a -> 'a -> int) -> ('a, [ `Read | `Write ]) t -> unit
val stable_sort :
('a -> 'a -> int) -> ('a, [ `Read | `Write ]) t -> unit
val fast_sort : ('a -> 'a -> int) -> ('a, [ `Read | `Write ]) t -> unit
val print :
?first:string ->
?last:string ->
?sep:string ->
('a BatIO.output -> 'b -> unit) ->
'a BatIO.output -> ('b, [< `Read | `Write > `Read ]) t -> unit
val sprint :
?first:string ->
?last:string ->
?sep:string ->
('a BatIO.output -> 'b -> unit) ->
('b, [< `Read | `Write > `Read ]) t -> string
module Exceptionless :
sig
val find :
('a -> bool) -> ('a, [< `Read | `Write > `Read ]) t -> 'a option
val findi :
('a -> bool) -> ('a, [< `Read | `Write > `Read ]) t -> int option
end
module Labels :
sig
val init : int -> f:(int -> 'a) -> ('a, [< `Read | `Write ]) t
val make : int -> init:'a -> ('a, [< `Read | `Write ]) t
val create : int -> init:'a -> ('a, [< `Read | `Write ]) t
val make_matrix :
dimx:int ->
dimy:int ->
'a -> (('a, [< `Read | `Write ]) t, [< `Read | `Write ]) t
val create_matrix :
dimx:int ->
dimy:int ->
'a -> (('a, [< `Read | `Write ]) t, [< `Read | `Write ]) t
val sub :
('a, [< `Read | `Write > `Read ]) t ->
pos:int -> len:int -> ('a, [< `Read | `Write ]) t
val fill :
('a, [< `Read | `Write > `Write ]) t ->
pos:int -> len:int -> 'a -> unit
val blit :
src:('a, [< `Read | `Write > `Read ]) t ->
src_pos:int ->
dst:('a, [< `Read | `Write > `Write ]) t ->
dst_pos:int -> len:int -> unit
val iter :
f:('a -> unit) -> ('a, [< `Read | `Write > `Read ]) t -> unit
val iteri :
f:(int -> 'a -> unit) ->
('a, [< `Read | `Write > `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 | `Write > `Read ]) t -> 'a
val fold_right :
f:('a -> 'b -> 'b) ->
('a, [< `Read | `Write > `Read ]) t -> init:'b -> 'b
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 | `Write > `Read ]) t ->
('b, [< `Read | `Write > `Read ]) t -> unit
val iter2i :
f:(int -> 'a -> 'b -> unit) ->
('a, [< `Read | `Write > `Read ]) t ->
('b, [< `Read | `Write > `Read ]) t -> unit
val exists :
f:('a -> bool) -> ('a, [< `Read | `Write > `Read ]) t -> bool
val for_all :
f:('a -> bool) -> ('a, [< `Read | `Write > `Read ]) t -> bool
val find :
f:('a -> bool) -> ('a, [< `Read | `Write > `Read ]) t -> 'a
val map :
f:('a -> 'b) ->
('a, [< `Read | `Write > `Read ]) t ->
('b, [< `Read | `Write ]) t
val mapi :
f:(int -> 'a -> 'b) ->
('a, [< `Read | `Write > `Read ]) t ->
('b, [< `Read | `Write ]) t
val filter :
f:('a -> bool) ->
('a, [< `Read | `Write > `Read ]) t ->
('a, [< `Read | `Write ]) t
val filter_map :
f:('a -> 'b option) ->
('a, [< `Read | `Write > `Read ]) t ->
('b, [< `Read | `Write ]) t
end
external unsafe_get : ('a, [< `Read | `Write > `Read ]) t -> int -> 'a
= "%array_unsafe_get"
external unsafe_set :
('a, [< `Read | `Write > `Write ]) t -> int -> 'a -> unit
= "%array_unsafe_set"
end
end`