mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
13 lines
227 B
Kotlin
13 lines
227 B
Kotlin
tailRecursive fun test(x : Int = 0, e : Any = "a") {
|
|
if (!e.equals("a")) {
|
|
throw IllegalArgumentException()
|
|
}
|
|
if (x > 0) {
|
|
test(x - 1)
|
|
}
|
|
}
|
|
|
|
fun box() : String {
|
|
test(100000)
|
|
return "OK"
|
|
} |