package
Version:
v0.0.4
Opens a new window with list of versions in this module.
Published: Sep 2, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Set is a collection of unique elements of type T.
It is implemented using a map with values of an empty struct.
New returns a new empty set of type T.
Has returns true if the element t is in the set s, false otherwise.
func (s Set[T]) Insert(t T)
Insert adds the element t to the set s.
If t is already in s, it does nothing.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.