Documentation
¶
Index ¶
- func Contains[T comparable](array []T, item T) bool
- func Distinct[T comparable](array []T) []T
- func DistinctBy[T any, K comparable](array []T, f func(T) K) []T
- func IsAll[T any](array []T, f func(T) bool) bool
- func IsDistinct[T comparable](array []T) bool
- func IsNone[T any](array []T, f func(T) bool) bool
- func IsSome[T any](array []T, f func(T) bool) bool
- func Reverse[T any](array []T) []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](array []T, item T) bool
Contains returns true if the item is in the array.
func Distinct ¶
func Distinct[T comparable](array []T) []T
Distinct returns all distinc items in an array
func DistinctBy ¶
func DistinctBy[T any, K comparable](array []T, f func(T) K) []T
DistinctBy returns the distinct members of the fn.
func IsDistinct ¶
func IsDistinct[T comparable](array []T) bool
IsDistinct returns true if all items in an array are distinct.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.