set

package
v0.0.0-...-e537141 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VoidVal = Void{}

Functions

This section is empty.

Types

type Set

type Set[T comparable] map[T]Void

func Empty

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

func FromMapKeys

func FromMapKeys[K comparable, V any](m map[K]V) Set[K]

func FromMapVals

func FromMapVals[K, V comparable](m map[K]V) Set[V]

func FromSlice

func FromSlice[T comparable](vals []T) Set[T]

func New

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

func (Set[T]) Add

func (s Set[T]) Add(val T)

func (Set[T]) Has

func (s Set[T]) Has(val T) (has bool)

func (Set[T]) Len

func (s Set[T]) Len() int

func (Set[T]) ToSlice

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

type Void

type Void struct{}

Jump to

Keyboard shortcuts

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