Documentation
¶
Index ¶
- type Set
- func (s Set[T]) All() iter.Seq[T]
- func (s *Set[T]) Clear()
- func (s Set[T]) Clone() Set[T]
- func (s Set[T]) Contains(item T) bool
- func (s Set[T]) Difference(other Set[T]) iter.Seq[T]
- func (s Set[T]) Equal(other Set[T]) bool
- func (_ Set[T]) Generate(rand *rand.Rand, size int) reflect.Value
- func (s *Set[T]) Insert(item T) bool
- func (s Set[T]) Intersection(other Set[T]) iter.Seq[T]
- func (s Set[T]) IsDisjoint(other Set[T]) bool
- func (s Set[T]) IsEmpty() bool
- func (s Set[T]) IsSubset(other Set[T]) bool
- func (s Set[T]) IsSuperset(other Set[T]) bool
- func (s Set[T]) Len() int
- func (s *Set[T]) Remove(item T) bool
- func (s Set[T]) SymmetricDifference(other Set[T]) iter.Seq[T]
- func (s Set[T]) Union(other Set[T]) iter.Seq[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 Collect ¶
func Collect[T comparable](seq iter.Seq[T]) Set[T]
func New ¶
func New[T comparable]() Set[T]
func Singleton ¶
func Singleton[T comparable](item T) Set[T]
Source Files
¶
- gen.go
- set.go
Click to show internal directories.
Click to hide internal directories.