Multiset.Makemodule Elt : sig ... endmodule Mul : MULTIPLICITYtype mul = Mul.ttype elt = Elt.ttype t = (Elt.t, Mul.t, Elt.compare) tinclude Ppx_compare_lib.Comparable.S with type t := tval compare : t Base__Ppx_compare_lib.compareinclude Ppx_compare_lib.Equal.S with type t := tval equal : t Base__Ppx_compare_lib.equalval sexp_of_t : t -> Sexplib0.Sexp.ttype compare = (Elt.compare, Mul.compare) comparecompare types are equipped with functions to support use of @@deriving compare, equal, sexp on types parameterized by such singleton types for compare functions. These derived functions are never actually called, since the compare type parameters are phantom.
val sexp_of_compare : compare -> Sexplib0.Sexp.tval compare_of_sexp : Sexplib0.Sexp.t -> comparemodule Provide_of_sexp (_ : sig ... end) : sig ... endval empty : tThe empty multiset over the provided order.
Map over the elements in ascending order. Preserves physical equality if f does.
Map over the multiplicities of the elements in ascending order.
Map over the multiplicities of the elements in ascending order.
Flat map over the elements in ascending order. Preserves physical equality if f e m is a singleton (e', m') with e == e' and Mul.equal m m' for all elements.
val is_empty : t -> boolval is_singleton : t -> boolval length : t -> intNumber of elements with non-zero multiplicity. O(1).
Classify a set as either empty, singleton, or otherwise.