fnutil

package
v1.31.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T any](f func(T) bool, xs []T) []T

func Intersection

func Intersection[D comparable](xs, ys []D) []D

func IsAll

func IsAll[T any](f func(T) bool, xs []T) bool

func Keys

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

func Map

func Map[T any, R any](f func(T) R, xs []T) []R

func PlanHashCode

func PlanHashCode[D comparable](data D) D

func RemoveIf

func RemoveIf[T any](f func(T) bool, xs []T) []T

func Values

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

Types

type IndexSetWithComparableIndex

type IndexSetWithComparableIndex[I comparable, D any] struct {
	// contains filtered or unexported fields
}

func IndexSet

func IndexSet[D comparable](xs []D) *IndexSetWithComparableIndex[D, D]

func NewIndexSetWithComparableIndex

func NewIndexSetWithComparableIndex[I comparable, D any](hashCode func(data D) I, xs []D) *IndexSetWithComparableIndex[I, D]

func (*IndexSetWithComparableIndex[I, D]) Contains

func (xs *IndexSetWithComparableIndex[I, D]) Contains(data D) bool

func (*IndexSetWithComparableIndex[I, D]) Intersection

func (xs *IndexSetWithComparableIndex[I, D]) Intersection(ys []D) []D

func (*IndexSetWithComparableIndex[I, D]) SubtractedBy

func (xs *IndexSetWithComparableIndex[I, D]) SubtractedBy(ys []D) []D

Jump to

Keyboard shortcuts

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