Skip to content

Instantly share code, notes, and snippets.

@lnds
Created January 10, 2016 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lnds/cb2519efd5fe43da3824 to your computer and use it in GitHub Desktop.
Save lnds/cb2519efd5fe43da3824 to your computer and use it in GitHub Desktop.
Ifs en Kotlin
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