Documentation
¶
Index ¶
- func Chunk[T any](items []T, size int) [][]T
- func Concat[T any](slices [][]T) []T
- func Contains[K comparable](items []K, value K) 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[T any](items []T, predicate func(T) bool) (T, error)
- func FindIndex[T any](items []T, predicate func(T) bool) int
- func FindLast[T any](items []T, predicate func(T) bool) (T, 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[T any](items []T) (T, error)
- func FirstOr[T any](items []T, defaultValue T) T
- func Get[T any](items []T, index int) (T, 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[K comparable](items []K, value K) 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[T any](items []T) (T, error)
- func LastOr[T any](items []T, defaultValue T) T
- func Map[T any](items []T, transform func(T) T) []T
- func Pop[T any](items []T) (T, []T, error)
- func Reverse[T any](items []T) []T
- func Shift[T any](items []T) (T, []T, error)
- func Unique[K comparable](items []K) []K
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[K comparable](items []K, value K) bool
func FindLastOr ¶
func GroupBy ¶
func GroupBy[T any, K comparable](items []T, keyFunc func(T) K) map[K][]T
func IndexOf ¶
func IndexOf[K comparable](items []K, value K) int
func IsNotEmpty ¶
func Unique ¶
func Unique[K comparable](items []K) []K
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.