Documentation ¶
Index ¶
- func AllBut[T any](n int, values []T) []T
- func As[Type any](v any) Type
- func Complement[T any](predicate func(t T) bool) func(t T) bool
- func Drain[T any](channel <-chan T) (slice []T)
- func Drop[T any](n int, values []T) []T
- func DropWhile[T any](predicate func(T) bool, values []T) (result []T)
- func Filter[T any](predicate func(t T) bool, values []T) (result []T)
- func FilterAs[Type any](collection []any) []Type
- func Flatten[T any](matrix [][]T) (result []T)
- func Frequencies[T comparable](values []T) map[T]int
- func IndexBy[K comparable, V any](key func(V) K, list []V) map[K]V
- func Is[Type any](v any) bool
- func Load[T any](result chan<- T, stream []T)
- func Map[I, O any](transform func(i I) O, values []I) (result []O)
- func MapCat[I, O any](transform func(i I) []O, values []I) (result []O)
- func Range[N Number](start, stop N) (result []N)
- func Reduce[T any](calc func(a, b T) T, start T, values []T) (result T)
- func Remove[T any](predicate func(t T) bool, values []T) []T
- func Rest[T any](values []T) []T
- func SlicedIndexBy[K comparable, V any](key func(V) K, list []V) map[K][]V
- func SortAscending[C LessThan, V any](key func(V) C, original []V) (result []V)
- func SortDescending[C LessThan, V any](key func(V) C, original []V) (result []V)
- func Take[T any](n int, values []T) []T
- func TakeWhile[T any](predicate func(T) bool, values []T) (result []T)
- type Integer
- type LessThan
- type Number
- type Pair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Complement ¶
func Frequencies ¶ added in v0.3.0
func Frequencies[T comparable](values []T) map[T]int
func IndexBy ¶
func IndexBy[K comparable, V any](key func(V) K, list []V) map[K]V
func SlicedIndexBy ¶
func SlicedIndexBy[K comparable, V any](key func(V) K, list []V) map[K][]V
func SortAscending ¶
func SortDescending ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.