mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
8 lines
191 B
Kotlin
8 lines
191 B
Kotlin
tailRecursive fun Int.test(x : Int) : Int {
|
|
if (this > 1) {
|
|
return (this - 1) test x
|
|
}
|
|
return this
|
|
}
|
|
|
|
fun box() : String = if (1000000.test(1000000) == 1) "OK" else "FAIL" |