Created
August 3, 2019 16:09
-
-
Save vamsitallapudi/23fa659f6ccbd0e6ce88a93920d4dc2e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
val list = listOf(1, 3, 5, 7, 9) | |
// a function taking a single function as a parameter | |
list.forEach({ println(it) }) //it -> iterator which iterates and gives each value of list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment