Last active
January 9, 2019 22:19
-
-
Save yayaa/233f9b45f7da64453a34883b24d43abb to your computer and use it in GitHub Desktop.
Improving the code - 2
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
fun main() { | |
getFruits() | |
.filter { it.name != null } | |
.filter { !it.isRotten } | |
.filter { it.color == Color.ORANGE } | |
.forEach { println("Yay! It's an orange ${it.name}") } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment