Versions in this module Expand all Collapse all v1 v1.0.1 Dec 21, 2025 Changes in this version + func Contains[T comparable](s Slice[T], element T) bool + func CountBy[T any, K comparable](s Slice[T], keyFn func(T) K) map[K]int + func GroupBy[T any, K comparable](s Slice[T], keyFn func(T) K) map[K][]T + func IndexBy[T any, K comparable](s Slice[T], keyFn func(T) K) map[K]T + func KeyBy[T any, K comparable](s Slice[T], keyFn func(T) K) map[K]T + func MaxBy[T any, K cmp.Ordered](s Slice[T], keyFn func(T) K) (T, bool) + func Max[T cmp.Ordered](s Slice[T]) (T, bool) + func MinBy[T any, K cmp.Ordered](s Slice[T], keyFn func(T) K) (T, bool) + func Min[T cmp.Ordered](s Slice[T]) (T, bool) + func ReduceRight[T, U any](s Slice[T], initial U, fn func(U, T) U) U + func Reduce[T, U any](s Slice[T], initial U, fn func(U, T) U) U + func SumBy[T any, K cmp.Ordered](s Slice[T], keyFn func(T) K) K + func Sum[T cmp.Ordered](s Slice[T]) T + func ToMap[T any, K comparable, V any](s Slice[T], keyFn func(T) K, valueFn func(T) V) map[K]V + func ToSet[T comparable](s Slice[T]) map[T]struct + type Entry struct + Key K + Value V + type Slice struct + func Compact[T comparable](s Slice[T]) Slice[T] + func Difference[T comparable](s Slice[T], others ...[]T) Slice[T] + func FlatMap[T, U any](s Slice[T], fn func(T) []U) Slice[U] + func Flatten[T any](s Slice[[]T]) Slice[T] + func FromMapEntries[K comparable, V any](m map[K]V) Slice[Entry[K, V]] + func FromMapKeys[K comparable, V any](m map[K]V) Slice[K] + func FromMap[K comparable, V any](m map[K]V) Slice[V] + func Intersection[T comparable](s Slice[T], others ...[]T) Slice[T] + func Map[T, U any](s Slice[T], fn func(T) U) Slice[U] + func Of[T any](data []T) Slice[T] + func Range(start, end int) Slice[int] + func SortByDesc[T any, K cmp.Ordered](s Slice[T], keyFn func(T) K) Slice[T] + func SortBy[T any, K cmp.Ordered](s Slice[T], keyFn func(T) K) Slice[T] + func SortFunc[T any](s Slice[T], cmpFn func(a, b T) int) Slice[T] + func Union[T comparable](s Slice[T], others ...[]T) Slice[T] + func UniqueBy[T any, K comparable](s Slice[T], keyFn func(T) K) Slice[T] + func Unique[T comparable](s Slice[T]) Slice[T] + func (s Slice[T]) Append(elements ...T) Slice[T] + func (s Slice[T]) Chunk(size int) [][]T + func (s Slice[T]) Clone() Slice[T] + func (s Slice[T]) Collect() []T + func (s Slice[T]) Concat(others ...[]T) Slice[T] + func (s Slice[T]) Count(predicate func(T) bool) int + func (s Slice[T]) Drop(n int) Slice[T] + func (s Slice[T]) DropRight(n int) Slice[T] + func (s Slice[T]) DropWhile(predicate func(T) bool) Slice[T] + func (s Slice[T]) Every(predicate func(T) bool) bool + func (s Slice[T]) Filter(predicate func(T) bool) Slice[T] + func (s Slice[T]) Find(predicate func(T) bool) (T, bool) + func (s Slice[T]) FindIndex(predicate func(T) bool) int + func (s Slice[T]) FindLast(predicate func(T) bool) (T, bool) + func (s Slice[T]) FindLastIndex(predicate func(T) bool) int + func (s Slice[T]) First() (T, bool) + func (s Slice[T]) ForEach(fn func(T)) Slice[T] + func (s Slice[T]) ForEachIndexed(fn func(int, T)) Slice[T] + func (s Slice[T]) IsEmpty() bool + func (s Slice[T]) Last() (T, bool) + func (s Slice[T]) Len() int + func (s Slice[T]) None(predicate func(T) bool) bool + func (s Slice[T]) Nth(n int) (T, bool) + func (s Slice[T]) Partition(predicate func(T) bool) (Slice[T], Slice[T]) + func (s Slice[T]) Prepend(elements ...T) Slice[T] + func (s Slice[T]) Reject(predicate func(T) bool) Slice[T] + func (s Slice[T]) Reverse() Slice[T] + func (s Slice[T]) Some(predicate func(T) bool) bool + func (s Slice[T]) Take(n int) Slice[T] + func (s Slice[T]) TakeRight(n int) Slice[T] + func (s Slice[T]) TakeWhile(predicate func(T) bool) Slice[T]