Documentation
¶
Index ¶
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{}
Set is a container that store unique elements in no particular order. Sets are an alias for map[T]struct{} where T is a comparable type.
func NewSet ¶
func NewSet[T comparable](values ...T) Set[T]
NewSet creates a new Set from a list of values.
func (Set[T]) ContainsAll ¶
ContainsAll returns true if the set contains all the values.
func (Set[T]) Remove ¶
Remove removes a value from the set. Returns true if the set contained the value.
Click to show internal directories.
Click to hide internal directories.