package
Version:
v0.7.0
Opens a new window with list of versions in this module.
Published: Jul 27, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
package sets is used to provide set like functionality for the library.
Set is a set of comparable elements.
NewSet creates a new set.
func (s Set[E]) Add(vals ...E)
Add adds elements to the set.
Contains returns true if the set contains the element.
func (s Set[E]) Intersection(s2 Set[E]) Set[E]
Intersection returns the intersection of two sets.
func (s Set[E]) Members() []E
Members returns the members of the set.
func (s Set[E]) Remove(vals ...E)
Remove deletes elements from the set.
String implements the Stringer interface.
Union returns the union of two sets.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.