set

package
v20.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package set provides a Set implementation for Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set[T cmp.Ordered] map[T]struct{}

Set implements a simple generic Set implementation. The zero value is not valid. Use set.New to create new instances.

func New

func New[T cmp.Ordered](values ...T) Set[T]

func (Set[T]) Add

func (self Set[T]) Add(values ...T)

func (Set[T]) AddSet

func (self Set[T]) AddSet(other Set[T])

func (Set[T]) Values

func (self Set[T]) Values() []T

Jump to

Keyboard shortcuts

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