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 Sort: sig .. end
Array
and List
should be used instead.
The new functions are faster and use less memory.val list : ('a -> 'a -> bool) -> 'a list -> 'a list
true
if its first argument is
less than or equal to its second argument.val array : ('a -> 'a -> bool) -> 'a array -> unit
true
if its first argument is
less than or equal to its second argument.
The array is sorted in place.val merge : ('a -> 'a -> bool) -> 'a list -> 'a list -> 'a list
merge
returns a sorted list containing the elements
from the two lists. The behavior is undefined if the two
argument lists were not sorted.