oden/fine/tests/expression/worst_fib.fine

16 lines
207 B
Text

fun worst_fib(n: f64) -> f64 {
if n == 0 {
0
} else if n == 1 {
1
} else {
worst_fib(n-2) + worst_fib(n-1)
}
}
fun test() -> f64 {
worst_fib(10)
}
// @no-errors
// @eval: Float(55.0)