Last active
February 11, 2024 11:04
-
-
Save elc49/a58dceec45e010046aaf0100da0d9a13 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ConditionIterator func(interface{}, int) bool | |
func Some(array []interface{}, iterator ConditionIterator) bool { | |
res := false | |
for index, data := range array { | |
res = res || iterator(data, index) | |
} | |
return res | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment