sets

package
v0.0.0-...-dbc70a4 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 2 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 SetFrom

func SetFrom[T comparable](s []T) Set[T]

func SetOf

func SetOf[T comparable](s ...T) Set[T]

func (*Set[T]) Add

func (s *Set[T]) Add(v T)

func (*Set[T]) Clone

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

func (*Set[T]) Contains

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

func (*Set[T]) Remove

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

func (*Set[T]) Seq

func (s *Set[T]) Seq(yield func(T) bool)

func (*Set[T]) Slice

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

type SyncSet

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

func (*SyncSet[T]) Add

func (s *SyncSet[T]) Add(v T)

func (*SyncSet[T]) Has

func (s *SyncSet[T]) Has(v T) bool

func (*SyncSet[T]) Remove

func (s *SyncSet[T]) Remove(v T)

func (*SyncSet[T]) Slice

func (s *SyncSet[T]) Slice() []T

Jump to

Keyboard shortcuts

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