Focused this in iRacing so that I don't need to worry about some stuff for now
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
func findEntry[T any](s []T, predicate func(T) bool) int {
|
||||
for i, elem := range s {
|
||||
if predicate(elem) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
|
||||
return -1
|
||||
}
|
||||
Reference in New Issue
Block a user