Documentation
¶
Index ¶
- type Set
- func (s Set[T]) Add(item T)
- func (s *Set[T]) Clear()
- func (s Set[T]) Filter(f func(T) bool) Set[T]
- func (s Set[T]) ForEach(f func(T))
- func (s Set[T]) Has(item T) bool
- func (s Set[T]) IsEmpty() bool
- func (s Set[T]) Len() int
- func (s Set[T]) Map(f func(T) T) Set[T]
- func (s Set[T]) Remove(item T)
- func (s Set[T]) ToSlice() []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[T comparable] map[T]struct{}
func (Set[T]) ForEach ¶
func (s Set[T]) ForEach(f func(T))
ForEach iterates over the set and calls the given function for each item.
Click to show internal directories.
Click to hide internal directories.