Skip to content

Instantly share code, notes, and snippets.

@pedrolopesme
Last active June 11, 2017 20:48
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 pedrolopesme/fa05fdb7833ab5fdc9947624ab780618 to your computer and use it in GitHub Desktop.
Save pedrolopesme/fa05fdb7833ab5fdc9947624ab780618 to your computer and use it in GitHub Desktop.
fun main(args: Array<String>) {
val myList = listof(1,3,6,7)
// x deixa de ser declarado e vira somente "it"
val greaterThan5 = myList.count{ it > 5 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment