Skip to content

Instantly share code, notes, and snippets.

@pedrolopesme
Created June 11, 2017 20:49
Embed
What would you like to do?
fun main(args: Array<String>) {
var sum = 0
val myList = listof(1,3,6,7)
myList.forEach{ sum += it }
println(sum) // imprime 17
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment