Documentation ¶
Index ¶
- func AllMatch[E comparable](s []E, e E) bool
- func AllMatchFunc[E any](s []E, matchFunc func(E) bool) bool
- func AnyMatch[E comparable](s []E, e E) bool
- func AnyMatchFunc[E any](s []E, matchFunc func(E) bool) bool
- func Distinct[E comparable](s []E) []E
- func DistinctFunc[E any](s []E, matchFunc func(preItem, nextItem E) bool) []E
- func Filter[E any](s []E, filterFunc func(E) bool) (ret []E)
- func GroupBy[E any, K comparable](s []E, getKey func(E) K) map[K][]E
- func Limit[E any](s []E, n int) []E
- func Map[E1, E2 any](s1 []E1, mapFunc func(E1) (E2, error)) (s2 []E2, e error)
- func MustMap[E1, E2 any](s1 []E1, mapFunc func(E1) E2) (s2 []E2)
- func Shuffle[E any](s []E) (ret []E)
- func Skip[E any](s []E, n int) []E
- func ToAny[E any](s []E) (ret []any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllMatch ¶
func AllMatch[E comparable](s []E, e E) bool
func AllMatchFunc ¶
func AnyMatch ¶
func AnyMatch[E comparable](s []E, e E) bool
func AnyMatchFunc ¶
func Distinct ¶
func Distinct[E comparable](s []E) []E
func DistinctFunc ¶
func GroupBy ¶
func GroupBy[E any, K comparable](s []E, getKey func(E) K) map[K][]E
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.