Documentation
¶
Index ¶
- func Keys[K comparable, T any](m map[K]T) []K
- func Pop[T any](s []T) (T, []T)
- func PtrTo[T any](t T) *T
- func RemoveElement[K comparable](s []K, k K) []K
- type Current
- type Iterator
- type Next
- type Set
- func (s Set[K]) Add(k K)
- func (s Set[K]) Copy() Set[K]
- func (s Set[K]) Difference(others ...Set[K]) Set[K]
- func (s Set[K]) Intersection(others ...Set[K]) Set[K]
- func (s Set[K]) SymmetricDifference(other Set[K]) Set[K]
- func (s Set[K]) Union(others ...Set[K]) Set[K]
- func (s Set[K]) Update(others ...Set[K]) Set[K]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Keys ¶
func Keys[K comparable, T any](m map[K]T) []K
func RemoveElement ¶ added in v0.1.2
func RemoveElement[K comparable](s []K, k K) []K
Types ¶
type Iterator ¶
func NewIterator ¶
type Set ¶
type Set[K comparable] map[K]struct{}
func (Set[K]) Difference ¶
Difference returns a new set containing values that are not in others
func (Set[K]) Intersection ¶
Intersection returns a new set containing values that are in both the set and all others
func (Set[K]) SymmetricDifference ¶
SymmetricDifference returns a new set containing values that are in the original set or other but not both
Click to show internal directories.
Click to hide internal directories.