Created
January 10, 2016 18:21
-
-
Save lnds/cb2519efd5fe43da3824 to your computer and use it in GitHub Desktop.
Ifs en Kotlin
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
if (!it.value.isDigit()) | |
return null | |
if (it.index >= tam) | |
return null | |
else { | |
val digit = it.value.toInt() - '0'.toInt() | |
if (digit in num) return null | |
num = num.plus(digit) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment