FindIndexes¶
func FindIndexes[T any](slice []T, predicate func(value T, index int, slice []T) bool) []int
FindIndexes takes a slice of type T and executes the passed in predicate function for each element in the slice, returning a slice containing all indexes for which the predicate returned true. The function is passed the current element, the current index and the slice itself as function arguments.