Documentation
¶
Index ¶
- func Chunk[T any](items []T, size int) [][]T
- func Concat[T any](slices [][]T) []T
- func Contains(items []any, value any) bool
- func Drop[T any](items []T, n int) []T
- func DropLast[T any](items []T, n int) []T
- func Filter[T any](items []T, predicate func(T) bool) []T
- func Find(items []any, predicate func(any) bool) (any, error)
- func FindIndex[T any](items []T, predicate func(T) bool) int
- func FindLast(items []any, predicate func(any) bool) (any, error)
- func FindLastOr[T any](items []T, predicate func(T) bool, defaultValue T) T
- func FindOr[T any](items []T, predicate func(T) bool, defaultValue T) T
- func First[T any](items []T, n int) []T
- func FirstOne(items []any) (any, error)
- func FirstOr[T any](items []T, defaultValue T) T
- func Get(items []any, index int) (any, error)
- func GetOr[T any](items []T, index int, defaultValue T) T
- func GroupBy[T any, K comparable](items []T, keyFunc func(T) K) map[K][]T
- func IndexOf(items []any, value any) int
- func IsEmpty[T any](items []T) bool
- func IsNotEmpty[T any](items []T) bool
- func Last[T any](items []T, n int) []T
- func LastOne(items []any) (any, error)
- func LastOr[T any](items []T, defaultValue T) T
- func Map[T any](items []T, transform func(T) T) []T
- func Pop(items []any) (any, []any, error)
- func Reverse[T any](items []T) []T
- func Shift(items []any) (any, []any, error)
- func Unique(items []any) []any
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindLastOr ¶
func GroupBy ¶
func GroupBy[T any, K comparable](items []T, keyFunc func(T) K) map[K][]T
func IsNotEmpty ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.