sets

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 1 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] interface {
	// Add adds an element to the set.
	Add(elem T) bool
	// Remove removes an element from the set.
	Remove(elem T) bool
	// Creates a unique slice new set with the elements
	ToSlice() []T
}

func NewSet

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

NewSet creates a new set.

Jump to

Keyboard shortcuts

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