Documentation ¶
Index ¶
- func All[T any](source []T, predicate func(T) bool) bool
- func Any[T any](source []T, predicate func(T) bool) bool
- func FindAll[T any](source []T, predicate func(T) bool) []T
- func FindFirst[T any](source []T, predicate func(T) bool) (element T, ok bool)
- func FindIndex[T any](source []T, predicate func(T) bool) int
- func Map[T, V any](source []T, mapper func(T) V) []V
- func PointersOf(v interface{}) interface{}
- func Reduce[TSource, TAccumulation any](source []TSource, seed TAccumulation, ...) TAccumulation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAll ¶ added in v1.2.7
Retrieves all the elements that match the conditions defined by the specified predicate.
func FindFirst ¶ added in v1.2.12
Returns the first element matching the predicate. 'ok' is true if an element was found and false if not.
func FindIndex ¶ added in v1.2.9
Returns the index of the first element matching the predicate or -1 on fail
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.