module type Infix = sig ... endmodule type Map_and_set_binable = sig ... endmodule type Polymorphic_compare = sig ... endmodule type S_plain = sig ... endmodule type S = sig ... endmodule type S_binable = sig ... endmodule type S_common = sig ... endmodule type Validate = sig ... endmodule type With_zero = sig ... endval lexicographic : ('a -> 'a -> int) list -> 'a -> 'a -> intlexicographic cmps x ycomparesxandylexicographically using functions in the listcmps.
val lift : ('a -> 'a -> 'int_or_bool) -> f:('b -> 'a) -> 'b -> 'b -> 'int_or_boollift cmp ~f x ycomparesxandyby comparingf xandf yviacmp.
val reverse : ('a -> 'a -> 'int_or_bool) -> 'a -> 'a -> 'int_or_boolreverse cmp x y = cmp y xNote: The
Comparable.Sinterface exports bothascendinganddescendingcomparisons, so in most cases, it's better to use those.
module Inherit : functor (C : sig ... end) -> functor (T : sig ... end) -> S with type t := T.tInherit comparability from a component.
Comparison-only Functors
module Polymorphic_compare : functor (T : sig ... end) -> Polymorphic_compare with type t := T.tMake Functors
module Make_plain : functor (T : sig ... end) -> S_plain with type t := T.tmodule Make_plain_using_comparator : functor (T : sig ... end) -> S_plain with type t := T.t with type comparator_witness := T.comparator_witnessmodule Make_using_comparator : functor (T : sig ... end) -> S with type t := T.t with type comparator_witness := T.comparator_witnessmodule Make_binable : functor (T : sig ... end) -> S_binable with type t := T.tmodule Make_binable_using_comparator : functor (T : sig ... end) -> S_binable with type t := T.t with type comparator_witness := T.comparator_witnessmodule Extend : functor (M : Base.Comparable.S) -> functor (X : sig ... end) -> S with type t := M.t with type comparator_witness := M.comparator_witnessmodule Extend_binable : functor (M : Base.Comparable.S) -> functor (X : sig ... end) -> S_binable with type t := M.t with type comparator_witness := M.comparator_witnessmodule Map_and_set_binable : functor (T : sig ... end) -> Map_and_set_binable with type t := T.tmodule 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_witnessmodule Validate_with_zero : functor (T : sig ... end) -> sig ... endmodule Stable : sig ... end