stdcompat

Compatibility module for OCaml standard library
IN THIS PACKAGE
type 'a t = 'a array
  • since 4.08.0: type 'a t = 'a array
module Floatarray = Stdlib.ArrayLabels.Floatarray
  • since 4.06.0: module Floatarray = ArrayLabels.Floatarray
val fold_left_map : f:( 'a -> 'b -> 'a * 'c ) -> init:'a -> 'b array -> 'a * 'c array
  • since 4.13.0:

val fold_left_map : f:('a -> 'b -> ('a * 'c)) -> init:'a -> 'b array -> ('a * 'c array)

val find_opt : f:( 'a -> bool ) -> 'a array -> 'a option
  • since 4.13.0: val find_opt : f:('a -> bool) -> 'a array -> 'a option
val find_map : f:( 'a -> 'b option ) -> 'a array -> 'b option
  • since 4.13.0:

val find_map : f:('a -> 'b option) -> 'a array -> 'b option

val split : ('a * 'b) array -> 'a array * 'b array
  • since 4.13.0: val split : ('a * 'b) array -> ('a array * 'b array)
val combine : 'a array -> 'b array -> ('a * 'b) array
  • since 4.13.0: val combine : 'a array -> 'b array -> ('a * 'b) array
val for_all2 : f:( 'a -> 'b -> bool ) -> 'a array -> 'b array -> bool
  • since 4.11.0:

val for_all2 : f:('a -> 'b -> bool) -> 'a array -> 'b array -> bool

val exists2 : f:( 'a -> 'b -> bool ) -> 'a array -> 'b array -> bool
  • since 4.11.0:

val exists2 : f:('a -> 'b -> bool) -> 'a array -> 'b array -> bool

val to_seq : 'a array -> 'a Seq.t
  • since 4.07.0: val to_seq : 'a array -> 'a Seq.t
val to_seqi : 'a array -> (int * 'a) Seq.t
  • since 4.07.0: val to_seqi : 'a array -> (int * 'a) Seq.t
val of_seq : 'a Seq.t -> 'a array
  • since 4.07.0: val of_seq : 'a Seq.t -> 'a array
val iter2 : f:( 'a -> 'b -> unit ) -> 'a array -> 'b array -> unit
  • since 4.05.0:

val iter2 : f:('a -> 'b -> unit) -> 'a array -> 'b array -> unit

val map2 : f:( 'a -> 'b -> 'c ) -> 'a array -> 'b array -> 'c array
  • since 4.05.0:

val map2 : f:('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array

val create_float : int -> float array
  • since 4.03.0:

external create_float : int -> float array = "caml_make_float_vect"

val for_all : f:( 'a -> bool ) -> 'a array -> bool
  • since 4.03.0: val for_all : f:('a -> bool) -> 'a array -> bool
val exists : f:( 'a -> bool ) -> 'a array -> bool
  • since 4.03.0: val exists : f:('a -> bool) -> 'a array -> bool
val mem : 'a -> set:'a array -> bool
  • since 4.03.0: val mem : 'a -> set:'a array -> bool
val memq : 'a -> set:'a array -> bool
  • since 4.03.0: val memq : 'a -> set:'a array -> bool
val length : 'a array -> int
val get : 'a array -> int -> 'a

Alias for ArrayLabels.get

val set : 'a array -> int -> 'a -> unit

Alias for ArrayLabels.set

val make : int -> 'a -> 'a array
  • since 3.08.0: external make : int -> 'a -> 'a array = "caml_make_vect"
  • since 3.07.0: external make : int -> 'a -> 'a array = "make_vect"
val init : int -> f:( int -> 'a ) -> 'a array
val make_matrix : dimx:int -> dimy:int -> 'a -> 'a array array
val append : 'a array -> 'a array -> 'a array
val concat : 'a array list -> 'a array
val sub : 'a array -> pos:int -> len:int -> 'a array

Alias for ArrayLabels.sub

val copy : 'a array -> '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 to_list : 'a array -> 'a list
val of_list : 'a list -> 'a array
val iter : f:( 'a -> unit ) -> 'a array -> unit
val iteri : f:( int -> 'a -> unit ) -> 'a array -> unit
val map : f:( 'a -> 'b ) -> 'a array -> 'b array

Alias for ArrayLabels.map

val mapi : f:( int -> 'a -> 'b ) -> 'a array -> 'b array
val fold_left : f:( 'a -> 'b -> 'a ) -> init:'a -> 'b array -> 'a
val fold_right : f:( 'b -> 'a -> 'a ) -> 'b array -> init:'a -> 'a
  • since 4.00.0:

val fold_right : f:('b -> 'a -> 'a) -> 'b array -> init:'a -> 'a

  • since 3.07.0:

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 unsafe_get : 'a array -> int -> 'a
val unsafe_set : 'a array -> int -> 'a -> unit