package ocaml-base-compiler

  1. Overview
  2. Docs
Official 4.06.0 release

Install

Dune Dependency

Authors

Maintainers

Sources

4.06.0.tar.gz
sha256=011879c913e8f988ecdac020b205e2baa4023052efed25013bdb9a6b0d5c6a80
md5=4f3906e581181c5435078ffe3e485e3f

doc/stdlib/Sort/index.html

Module Sort

Sorting and merging lists.

  • deprecated

    This module is obsolete and exists only for backward compatibility. The sorting functions in 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

Sort a list in increasing order according to an ordering predicate. The predicate should return true if its first argument is less than or equal to its second argument.

  • deprecated Use List.sort instead.
val array : ('a -> 'a -> bool) -> 'a array -> unit

Sort an array in increasing order according to an ordering predicate. The predicate should return true if its first argument is less than or equal to its second argument. The array is sorted in place.

  • deprecated Use Array.sort instead.
val merge : ('a -> 'a -> bool) -> 'a list -> 'a list -> 'a list

Merge two lists according to the given predicate. Assuming the two argument lists are sorted according to the predicate, merge returns a sorted list containing the elements from the two lists. The behavior is undefined if the two argument lists were not sorted.

  • deprecated Use List.merge instead.
OCaml

Innovation. Community. Security.