Documentation ¶
Index ¶
- func Chunk[T any](slice []T, size int) [][]T
- func Compact[T constraints.Ordered](slice []T) []T
- func Concat[T any](slices ...[]T) []T
- func Difference[T constraints.Ordered](slice1 []T, slice2 []T) []T
- func Filter[T any](slice []T, fn func(T) bool) []T
- func ForEach[T any](slice []T, fn func(currentValue T, args ...any))
- func GroupBy[T constraints.Ordered, M constraints.Ordered](slice []T, fn func(currentValue T) M) map[M][]T
- func Intersection[T constraints.Ordered](slice1 []T, slice2 []T) []T
- func Map[T any, M any](slice []T, fn func(currentValue T) M) []M
- func Max[T constraints.Ordered](numbers ...T) T
- func Min[T constraints.Ordered](numbers ...T) T
- func MinMax[T constraints.Ordered](numbers ...T) (min T, max T)
- func Reduce[T, M any](slice []T, fn func(M, T) M, initValue M) M
- func Sort[T constraints.Ordered](slice []T) []T
- func Union[T comparable](slices ...[]T) []T
- func Unique[T comparable](slice []T) []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compact ¶
func Compact[T constraints.Ordered](slice []T) []T
func Difference ¶
func Difference[T constraints.Ordered](slice1 []T, slice2 []T) []T
func GroupBy ¶
func GroupBy[T constraints.Ordered, M constraints.Ordered]( slice []T, fn func(currentValue T) M, ) map[M][]T
func Intersection ¶
func Intersection[T constraints.Ordered](slice1 []T, slice2 []T) []T
func Max ¶
func Max[T constraints.Ordered](numbers ...T) T
func Min ¶
func Min[T constraints.Ordered](numbers ...T) T
func MinMax ¶
func MinMax[T constraints.Ordered](numbers ...T) (min T, max T)
func Sort ¶
func Sort[T constraints.Ordered](slice []T) []T
func Union ¶
func Union[T comparable](slices ...[]T) []T
func Unique ¶
func Unique[T comparable](slice []T) []T
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.