Created
April 11, 2019 13:58
-
-
Save vodamiro/babc7b2a6f9f39b1de66e66248db42d9 to your computer and use it in GitHub Desktop.
S_A_SingleExpression3.kt
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 parseColor(color: String) = when (color.toLowerCase()) { | |
"red" -> "#f00" | |
"green" -> "#0f0" | |
"blue" -> "#00f" | |
else -> "#fff" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment