Created
September 29, 2017 13:44
-
-
Save whalemare/6be2e564c6135378a22ce8c9553133da 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
// for | |
for (item in listOf(1, 2, 3)) print(item) | |
for (item: Int in ints) { | |
// ... | |
} | |
for (i in array.indices) { | |
print(array[i]) | |
} | |
// but we have streams | |
listOf(1,2,3).forEach { print(it) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment