12 lines
172 B
Go
12 lines
172 B
Go
package py_builtin
|
|
|
|
func All[T comparable](slice []T, condition func(T) bool) bool {
|
|
|
|
for _, v := range slice {
|
|
if !condition(v) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|