Logos. SortedSet
(Logos v0.2.0)
Copy Markdown
A Logos sorted set: (sorted-set ...) / (sorted-set-by cmp ...).
Logos.SortedMap's exact counterpart, minus the value half of each
entry -- see that module's moduledoc for the full reasoning (sorted
association list, cmp a plain 2-arity Elixir function built once by
Logos.Primitives, genuine new runtime value type with its own
type-of tag :sorted-set, content-equal to a hash-set with the same
elements, prints as #{...} in sorted order with no dedicated reader
syntax).
Summary
Functions
Number of elements.
Returns a new sorted set with elem removed (a no-op if absent).
True if elem is a member.
Builds a sorted set from elems and comparator cmp.
Returns a new sorted set with elem added (a no-op if already present).
Converts to a plain Elixir list, in sorted order.
Types
Functions
@spec count(t()) :: non_neg_integer()
Number of elements.
Returns a new sorted set with elem removed (a no-op if absent).
True if elem is a member.
Builds a sorted set from elems and comparator cmp.
Returns a new sorted set with elem added (a no-op if already present).
Converts to a plain Elixir list, in sorted order.