Documentation ¶
Index ¶
- func Filter[S ~[]E, E comparable](s S, e E) []E
- func FilterFunc[S ~[]E, E any](s S, f func(e E) bool) []E
- func FilterNot[S ~[]E, E comparable](s S, e E) []E
- func FindFunc[S ~[]V, V any](s S, f func(v V) bool) (V, bool)
- func FindRefFunc[S ~[]V, V any](s S, f func(v V) bool) *V
- func Map[S ~[]E, E, F any](s S, f func(e E) F) []F
- func MapRef[S ~[]E, E, F any](s S, f func(e *E) F) []F
- func ToMap[S ~[]E, E any, K comparable, V any](s S, f func(E) (K, V)) map[K]V
- func ToMapByKey[S ~[]V, K comparable, V any](s S, f func(v V) K) map[K]V
- func ToSetFunc[S ~[]V, K comparable, V any](s S, f func(v V) K) sets.Set[K]
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 FilterNot ¶
func FilterNot[S ~[]E, E comparable](s S, e E) []E
func FindRefFunc ¶
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.