set

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set[K comparable] map[K]struct{}

func New

func New[K comparable]() Set[K]

func (Set[K]) Add

func (s Set[K]) Add(k K)

func (Set[K]) Contains

func (s Set[K]) Contains(k K) bool

func (Set[K]) Each

func (s Set[K]) Each() iter.Seq[K]

Each returns an iterator over the set's elements

func (Set[K]) Empty

func (s Set[K]) Empty() bool

func (Set[K]) Len

func (s Set[K]) Len() int

func (Set[K]) Remove

func (s Set[K]) Remove(k K)

func (Set[K]) Values

func (s Set[K]) Values() []K

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL