mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
10 lines
228 B
Kotlin
Vendored
10 lines
228 B
Kotlin
Vendored
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
|
|
|
tailrec infix 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" |