set

package
v0.0.0-...-e03219f Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 0 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[T comparable] map[T]bool

func Diff

func Diff[T comparable](s, t Set[T]) Set[T]

func Intersect

func Intersect[T comparable](sets ...Set[T]) Set[T]

func NewSet

func NewSet[T comparable](vals ...T) Set[T]

func Union

func Union[T comparable](sets ...Set[T]) Set[T]

func (Set[T]) Add

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

func (Set[T]) Contains

func (s Set[T]) Contains(v T) bool

func (Set[T]) Pop

func (s Set[T]) Pop() (T, bool)

func (Set[T]) Remove

func (s Set[T]) Remove(vals ...T)

func (Set[T]) ToSlice

func (s Set[T]) ToSlice() []T

Jump to

Keyboard shortcuts

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