Documentation
¶
Index ¶
- type Set
- func (s *Set[T]) Add(items ...T)
- func (s *Set[T]) All() iter.Seq[T]
- func (s *Set[T]) Contains(item T) bool
- func (s *Set[T]) Difference(other *Set[T]) *Set[T]
- func (s *Set[T]) Intersection(other *Set[T]) *Set[T]
- func (s *Set[T]) Len() int
- func (s *Set[T]) Merge(other *Set[T])
- func (s *Set[T]) Remove(items ...T)
- func (s *Set[T]) Slice() []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
func NewSet ¶
func NewSet[T comparable](items ...T) *Set[T]
func (*Set[T]) Difference ¶
Difference returns a new set with elements in s that are not in other.
func (*Set[T]) Intersection ¶
Intersection returns a new set with elements common to both s and other.
Click to show internal directories.
Click to hide internal directories.