Documentation ¶
Index ¶
- Constants
- func Copy[I any](v []I) []I
- func Equal[I comparable](a, b []I) bool
- func Exclude[I comparable](slice []I, item I) ([]I, bool)
- func ExcludeFrom[I comparable](slice *[]I, item I) bool
- func Find[I any](slice []I, predicate Predicate[I]) *I
- func FindIndex[I any](slice []I, predicate Predicate[I]) int
- func Includes[I comparable](slice []I, item I) bool
- func Push[I any](slice *[]I, values ...I)
- func Some[I any](value []I, predicate Predicate[I]) bool
- type Predicate
Constants ¶
View Source
const NotFound = -1
NotFound is an index that is reported when no value is found.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
func Equal[I comparable](a, b []I) bool
Equal tells whether a and b contain the same elements. A nil argument is equivalent to an empty slice.
func Exclude ¶
func Exclude[I comparable](slice []I, item I) ([]I, bool)
func ExcludeFrom ¶
func ExcludeFrom[I comparable](slice *[]I, item I) bool
func Includes ¶
func Includes[I comparable](slice []I, item I) bool
Types ¶
Click to show internal directories.
Click to hide internal directories.