Created
January 10, 2019 19:11
-
-
Save yayaa/5908cf092504ca3f3705c62b5736dd4e to your computer and use it in GitHub Desktop.
Improving the code - 4
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 && !it.isRotten && it.color == Color.BLACK } | |
.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