slices

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[S ~[]E, E comparable](s S, e E) []E

func FilterFunc

func FilterFunc[S ~[]E, E any](s S, f func(e E) bool) []E

func FilterNot

func FilterNot[S ~[]E, E comparable](s S, e E) []E

func FindFunc

func FindFunc[S ~[]V, V any](s S, f func(v V) bool) (V, bool)

func FindRefFunc

func FindRefFunc[S ~[]V, V any](s S, f func(v V) bool) *V

func Map

func Map[S ~[]E, E, F any](s S, f func(e E) F) []F

func MapRef

func MapRef[S ~[]E, E, F any](s S, f func(e *E) F) []F

MapRef maps the references of the values of the slice to a result type.

func ToMap

func ToMap[S ~[]E, E any, K comparable, V any](s S, f func(E) (K, V)) map[K]V

func ToMapByKey

func ToMapByKey[S ~[]V, K comparable, V any](s S, f func(v V) K) map[K]V

func ToSetFunc

func ToSetFunc[S ~[]V, K comparable, V any](s S, f func(v V) K) sets.Set[K]

Types

This section is empty.

Jump to

Keyboard shortcuts

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