Skip to content

Instantly share code, notes, and snippets.

@sajjadyousefnia
Created March 25, 2019 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sajjadyousefnia/96b4470f9dd621298f21e67998faa8fc to your computer and use it in GitHub Desktop.
Save sajjadyousefnia/96b4470f9dd621298f21e67998faa8fc to your computer and use it in GitHub Desktop.
fun hasZeros(ints: List<Int>): Boolean {
ints.forEach {
if (it == 0) return true // returns from hasZeros
}
return false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment