Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filter ¶
func Filter[T comparable](f func(v T) bool, values ...T) []T
Filter returns the filtered items from the input set, using the filter function
func Unique ¶
func Unique[T comparable](values ...T) []T
Unique returns a slice from the original containing only unique elements
Types ¶
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
func NewSet ¶
func NewSet[T comparable](values ...T) *Set[T]
NewSet creates a new set, initialized with values
Click to show internal directories.
Click to hide internal directories.