Documentation ¶
Index ¶
- type OrderedComparable
- type Set
- func (s *Set[T]) Add(ts ...T)
- func (s *Set[T]) All() []T
- func (s *Set[T]) Delete(t T)
- func (s *Set[T]) Difference(other *Set[T]) *Set[T]
- func (s *Set[T]) Equal(other *Set[T]) bool
- func (s *Set[T]) Has(t T) bool
- func (s *Set[T]) Intersect(other *Set[T]) *Set[T]
- func (s *Set[T]) Len() int
- func (s *Set[T]) Union(other *Set[T]) *Set[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderedComparable ¶
type OrderedComparable interface { constraints.Ordered comparable }
type Set ¶
type Set[T OrderedComparable] struct { // contains filtered or unexported fields }
func New ¶
func New[T constraints.Ordered](ts ...T) *Set[T]
func (*Set[T]) Difference ¶
Click to show internal directories.
Click to hide internal directories.