Below is the API for the OCaml standard library. It's directly copied over from the OCaml Manual, formatted to the Reason syntax and styled accordingly. The API docs are work-in-progress; we'll be polishing these gradually!
If you're targeting JavaScript, the API docs for BuckleScript includes all of below, plus JS-specific APIs.
module Array2: sig .. endArray2 structure provides operations
similar to those of Bigarray.Genarray, but specialized to the
case of two-dimensional arrays.type ('a, 'b, 'c) t
'a, representation kind 'b, and memory layout 'c.val create : ('a, 'b) Bigarray.kind -> 'c Bigarray.layout -> int -> int -> ('a, 'b, 'c) tArray2.create kind layout dim1 dim2 returns a new bigarray of
two dimension, whose size is dim1 in the first dimension
and dim2 in the second dimension. kind and layout
determine the array element kind and the array layout
as described for Bigarray.Genarray.create.val dim1 : ('a, 'b, 'c) t -> intval dim2 : ('a, 'b, 'c) t -> intval kind : ('a, 'b, 'c) t -> ('a, 'b) Bigarray.kindval layout : ('a, 'b, 'c) t -> 'c Bigarray.layoutval get : ('a, 'b, 'c) t -> int -> int -> 'aArray2.get a x y, also written a.{x,y},
returns the element of a at coordinates (x, y).
x and y must be within the bounds
of a, as described for Bigarray.Genarray.get;
otherwise, Invalid_argument is raised.val set : ('a, 'b, 'c) t -> int -> int -> 'a -> unitArray2.set a x y v, or alternatively a.{x,y} <- v,
stores the value v at coordinates (x, y) in a.
x and y must be within the bounds of a,
as described for Bigarray.Genarray.set;
otherwise, Invalid_argument is raised.val sub_left : ('a, 'b, Bigarray.c_layout) t -> int -> int -> ('a, 'b, Bigarray.c_layout) tBigarray.Genarray.sub_left for more details.
Array2.sub_left applies only to arrays with C layout.val sub_right : ('a, 'b, Bigarray.fortran_layout) t -> int -> int -> ('a, 'b, Bigarray.fortran_layout) tBigarray.Genarray.sub_right for more details.
Array2.sub_right applies only to arrays with Fortran layout.val slice_left : ('a, 'b, Bigarray.c_layout) t -> int -> ('a, 'b, Bigarray.c_layout) Bigarray.Array1.tBigarray.Genarray.slice_left for more details.
Array2.slice_left applies only to arrays with C layout.val slice_right : ('a, 'b, Bigarray.fortran_layout) t -> int -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Array1.tBigarray.Genarray.slice_right
for more details. Array2.slice_right applies only to arrays
with Fortran layout.val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unitBigarray.Genarray.blit for more details.val fill : ('a, 'b, 'c) t -> 'a -> unitBigarray.Genarray.fill for more details.val of_array : ('a, 'b) Bigarray.kind -> 'c Bigarray.layout -> 'a array array -> ('a, 'b, 'c) tval map_file : Unix.file_descr -> ?pos:int64 -> ('a, 'b) Bigarray.kind -> 'c Bigarray.layout -> bool -> int -> int -> ('a, 'b, 'c) tBigarray.Genarray.map_file for more details.val unsafe_get : ('a, 'b, 'c) t -> int -> int -> 'aBigarray.Array2.get, but bounds checking is not always
performed.val unsafe_set : ('a, 'b, 'c) t -> int -> int -> 'a -> unitBigarray.Array2.set, but bounds checking is not always
performed.