mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
15 lines
234 B
Kotlin
Vendored
15 lines
234 B
Kotlin
Vendored
|
|
import org.jetbrains.kotlin.scripts.*
|
|
|
|
// this script expected parameter num : Int
|
|
|
|
fun fib(n: Int): Int {
|
|
val v = fibCombine( { fib(it) }, n)
|
|
println("fib($n)=$v")
|
|
return v
|
|
}
|
|
|
|
println("num: $num")
|
|
val result = fib(num)
|
|
|