☰
psSet
psSet
§psSet(K type :ordered psSet.K, psm ref psMap psSet.K unit, dummy unit) => psSet psSet.K:Set psSet.K
§psSet(K
type
:ordered psSet.K, psm ref psMap psSet.K unit, dummy unit) =>
psSet psSet.K:
Set psSet.Kadd all elements of the given Sequence to this set
create a sorted array from the elements of this set
list representation of values in this set
an empty psSet
intersection of two psSets
union of two psSets
get the highest element in this set
get the lowest element in this set
number of entries in this set. May be undefined, i.e., a range of
floating point numbers or an infinite set.
floating point numbers or an infinite set.
monoid of psSet with infix ∪ operation.
psSet is a persistent set of ordered values. This set is generally
well-behaved with respect to cumulative and average performance.
WARNING: Due to the high worst-case time for addition, this structure should
not be used in situations when adding a single element repeatedly to the same
instance of psSet is performance critical. If the resulting set's size n is a
power of 2, this will trigger the worst-case addition time resutling in
O(m*n log² n) for adding an element m times.