module type Infix = Core_kernel__Comparable_intf.Infix
module type Map_and_set_binable = Core_kernel__Comparable_intf.Map_and_set_binable
module type Polymorphic_compare = Core_kernel__Comparable_intf.Polymorphic_compare
module type S_plain = Core_kernel__Comparable_intf.S_plain
module type S = Core_kernel__Comparable_intf.S
module type S_binable = Core_kernel__Comparable_intf.S_binable
module type S_common = Core_kernel__Comparable_intf.S_common
module type Validate = Core_kernel__Comparable_intf.Validate
module type With_zero = Core_kernel__Comparable_intf.With_zero
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
Note: The Comparable.S
interface exports both ascending
and descending
comparisons, so in most cases, it's better to use those.
Inherit comparability from a component.
Make Functors
module Make_plain : functor (T : sig ... end) -> S_plain with type t := T.t
module Make_plain_using_comparator : functor (T : sig ... end) -> S_plain with type t := T.t with type comparator_witness := T.comparator_witness
module Make_using_comparator : functor (T : sig ... end) -> S with type t := T.t with type comparator_witness := T.comparator_witness
module Make_binable : functor (T : sig ... end) -> S_binable with type t := T.t
module Make_binable_using_comparator : functor (T : sig ... end) -> S_binable with type t := T.t with type comparator_witness := T.comparator_witness
module Extend : functor (M : Base.Comparable.S) -> functor (X : sig ... end) -> S with type t := M.t with type comparator_witness := M.comparator_witness
module Extend_binable : functor (M : Base.Comparable.S) -> functor (X : sig ... end) -> S_binable with type t := M.t with type comparator_witness := M.comparator_witness
module Map_and_set_binable : functor (T : sig ... end) -> Map_and_set_binable with type t := T.t
module Map_and_set_binable_using_comparator : functor (T : sig ... end) -> Map_and_set_binable with type t := T.t with type comparator_witness := T.comparator_witness
module Validate_with_zero : functor (T : sig ... end) -> sig ... end
module Stable : sig ... end