Multiset.S
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
val sexp_of_t : t -> Sexplib0.Sexp.t
compare
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.t
val compare_of_sexp : Sexplib0.Sexp.t -> compare
module Provide_of_sexp (_ : sig ... end) : sig ... end
val empty : t
The 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 -> bool
val is_singleton : t -> bool
val length : t -> int
Number of elements with non-zero multiplicity. O(1)
.
Classify a set as either empty, singleton, or otherwise.