mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
also remove some tests that are covered in the scripting-compiler tests now. Part of the cleanup to rewrite scripting to the new infrastructure.
12 lines
256 B
Kotlin
Vendored
12 lines
256 B
Kotlin
Vendored
// this script expected parameter param : class { val memberNum: Int }
|
|
|
|
fun fib(n: Int): Int {
|
|
val v = if(n < 2) 1 else fib(n-1) + fib(n-2)
|
|
println("fib($n)=$v")
|
|
return v
|
|
}
|
|
|
|
println("num: ${param.memberNum}")
|
|
val result = fib(param.memberNum)
|
|
|