set

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set[T comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[T comparable](vals ...T) *Set[T]

func (*Set[T]) Add

func (s *Set[T]) Add(vals ...T)

func (*Set[T]) AsSlice

func (s *Set[T]) AsSlice() []T

func (*Set[T]) Contains

func (s *Set[T]) Contains(val T) bool

func (*Set[T]) Count

func (s *Set[T]) Count() int

func (*Set[T]) Difference

func (s *Set[T]) Difference(other *Set[T]) *Set[T]

func (*Set[T]) Intersection

func (s *Set[T]) Intersection(other *Set[T]) *Set[T]

func (*Set[T]) Iter

func (s *Set[T]) Iter() func(func(int, T) bool)

func (*Set[T]) Remove

func (s *Set[T]) Remove(val T)

func (*Set[T]) SymmetricDifference

func (s *Set[T]) SymmetricDifference(other *Set[T]) *Set[T]

func (*Set[T]) Union

func (s *Set[T]) Union(other *Set[T]) *Set[T]

Jump to

Keyboard shortcuts

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