Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
Set is a minimal set that takes only ordered types: any type that supports the operators < <= >= >.
func New ¶
New returns an empty set with capacity size. The capacity will grow and shrink as a stdlib map.
func (*Set[T]) Difference ¶
Difference returns a set containing the elements of s that are not in x.
func (*Set[T]) OrderedList ¶
func (s *Set[T]) OrderedList() []T
OrderedList returns a slice of the elements of s, ordered. TODO This can probably be replaced in Go 1.20 when a generics slice packages reaches the stdlib.
Click to show internal directories.
Click to hide internal directories.