Documentation
¶
Index ¶
- func GroupBy[K comparable, V any](src []V, keyFn func(V) K) map[K][]V
- func Map[A any, B any](src []A, mapper func(A) B) []B
- func MapErr[A any, B any](src []A, mapper func(A) (B, error)) ([]B, error)
- func Reduce[V any, R any](values []V, acc R, reducer func(val V, acc R) R) R
- func ReduceErr[V any, R any](values []V, acc R, reducer func(val V, acc R) (R, error)) (R, error)
- func Split[X any](src []X, partLen int) [][]X
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupBy ¶ added in v0.2.4
func GroupBy[K comparable, V any](src []V, keyFn func(V) K) map[K][]V
GroupBy indexes the given values by the result of the key function.
func MapErr ¶ added in v0.2.0
MapErr allows the conversion to fail for any value that returns an error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.