set

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff[X comparable](a, b []X) []X

Diff returns the elements of a which are not in b.

Types

type Set

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

Set is a wrapper over map. I don't want to depend on a set library just for this.

func (Set[X]) Add

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

func (Set[X]) Includes

func (s Set[X]) Includes(k X) bool

func (Set[X]) Members

func (s Set[X]) Members() []X

Jump to

Keyboard shortcuts

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