Documentation ¶
Index ¶
- func Contains[T comparable](s []T, value T) bool
- func Copy[T any](src []T) (dst []T)
- func CutOff[T any](source []T, length int) []T
- func DeepContains[T any](s []T, value T) bool
- func DeepExclude[T any](s []T, exclude T) (excluded []T)
- func Each[T any](s []T, f func(index int, elem T))
- func Equal[T comparable](sliceA, sliceB []T) bool
- func Exclude[T comparable](s []T, excludes []T) (excluded []T)
- func Filter[T any](s []T, filter func(index int, elem T) bool) []T
- func First[T any](s []T) T
- func Last[T any](s []T) T
- func Reverse[T any](source []T) []T
- func Select[Source, Selected any](s []Source, generator func(index int, source Source) (selected Selected)) []Selected
- func Sort[T any](source []T, less func(elemA, elemB T) bool) []T
- func Split[T any](source []T, size int) [][]T
- func ToMap[Key comparable, Value any](s []Value, getKey func(index int, value Value) (key Key)) map[Key]Value
- func Uniq[T comparable](source []T) []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](s []T, value T) bool
func DeepContains ¶
func DeepExclude ¶
func DeepExclude[T any](s []T, exclude T) (excluded []T)
func Equal ¶
func Equal[T comparable](sliceA, sliceB []T) bool
func Exclude ¶
func Exclude[T comparable](s []T, excludes []T) (excluded []T)
func ToMap ¶
func ToMap[Key comparable, Value any](s []Value, getKey func(index int, value Value) (key Key)) map[Key]Value
func Uniq ¶
func Uniq[T comparable](source []T) []T
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.