Documentation
¶
Index ¶
- type Set
- func (s *Set[Value]) All() iter.Seq[Value]
- func (s *Set[Value]) Count() int
- func (s *Set[Value]) Delete(value Value) (newSet *Set[Value], affected bool)
- func (s *Set[Value]) Empty() bool
- func (s *Set[Value]) Has(value Value) bool
- func (s *Set[Value]) Insert(value Value) (newSet *Set[Value], affected bool)
- func (s *Set[Value]) Values() []Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[Value any] immutable_rb_tree.RBTree[Value]
The zero value of `Set` makes nonsense.
func FromValues ¶
func FromValues[Value any](cmp comparator.Comparator[Value], values ...Value) *Set[Value]
func New ¶
func New[Value any](cmp comparator.Comparator[Value]) *Set[Value]
func (*Set[Value]) Delete ¶
`affected` is true, meaning that a real deletion occurred, `newSet` will be different from the original; otherwise nothing happens, `newSet` is the original one.
Click to show internal directories.
Click to hide internal directories.