Skip to content

Instantly share code, notes, and snippets.

@sajjadyousefnia
Created June 6, 2018 09:42
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/badefc68e3f25c7f395177ee863ab4ea to your computer and use it in GitHub Desktop.
Save sajjadyousefnia/badefc68e3f25c7f395177ee863ab4ea to your computer and use it in GitHub Desktop.
fun surroundingFunction() {
val intList = listOf(1, 2, 3, 4, 5)
intList.forEach ( fun(number) {
if (number % 2 == 0) {
return
}
})
println("End of surroundingFunction()") // statement executed
}
surroundingFunction() // will print "End of surroundingFunction()"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment