= 768" x-on:close-sidebar="sidebar=window.innerWidth >= 768 && true">
package base
-
base
-
-
base.base_internalhash_types
-
base.caml
-
base.md5
-
base.shadow_stdlib
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Various combinators for compare
and equal
functions.
lexicographic cmps x y
compares x
and y
lexicographically using functions in the list cmps
.
lift cmp ~f x y
compares x
and y
by comparing f x
and f y
via cmp
.
reverse cmp x y = cmp y x
Reverses the direction of asymmetric relations by swapping their arguments. Useful, e.g., for relations implementing "is a subset of" or "is a descendant of".
Where reversed relations are already provided, use them directly. For example, Comparable.S
provides ascending
and descending
, which are more readable as a pair than compare
and reverse compare
. Similarly, <=
is more idiomatic than reverse (>=)
.
The functions below are analogues of the type-specific functions exported by the Comparable.S
interface.