Last active
December 19, 2016 14:30
-
-
Save sliskiCode/b080d45cc8a54e2ac0111b004fd91186 to your computer and use it in GitHub Desktop.
Living (Android) without Kotlin #4
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
| fun foo(persons: MutableList<Person>) { | |
| persons.filter { it.age >= 21 } | |
| .filter { it.name.startsWith("P") } | |
| .map { it.name } | |
| .sorted() | |
| .forEach(::println) | |
| } | |
| data class Person(val name: String, val age: Int) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment