f

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filtered

func Filtered[T any](ts []T, f func(T) bool) []T

func FilteredMap

func FilteredMap[K comparable, T any](tm map[K]T, f func(T) bool) map[K]T

func Find

func Find[T comparable](slice []T, findFunc func(T) bool) (T, bool)

func Intersection

func Intersection[T comparable](slice1, slice2 []T) []T

func Map

func Map[T, U any](ts []T, f func(T) U) []U

func MapMap

func MapMap[K comparable, T, U any](tm map[K]T, f func(T) U) map[K]U

func RemoveDuplicates

func RemoveDuplicates[T comparable](sliceList []T) []T

func RemoveValue

func RemoveValue[T comparable](slice []T, value T) []T

func SlicesItemsMatch

func SlicesItemsMatch[T comparable](slice1, slice2 []T) bool

Types

type Set

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

func NewSet

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

func (Set[T]) Add

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

func (Set[T]) Contains

func (s Set[T]) Contains(item T) bool

func (Set[T]) Items

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

func (Set[T]) Remove

func (s Set[T]) Remove(item T)

Jump to

Keyboard shortcuts

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