Documentation ¶
Index ¶
- func List[T ordered](s Set[T]) []T
- type Set
- func (s Set[T]) Delete(items ...T) Set[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(item T) bool
- func (s Set[T]) HasAny(items ...T) bool
- func (s Set[T]) Insert(items ...T) Set[T]
- func (s Set[T]) Intersection(o Set[T]) Set[T]
- func (s Set[T]) Len() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Set ¶
type Set[T comparable] map[T]struct{}
func (Set[T]) Difference ¶
Difference returns a set of objects that are not in other.
func (Set[T]) Intersection ¶
Intersection returns a new set which includes the item in BOTH s and other
Click to show internal directories.
Click to hide internal directories.