zlox/samples/ch24_fib.lox

10 lines
137 B
Plaintext

fun fib(n) {
if (n < 2) return n;
return fib(n - 2) + fib(n - 1);
}
var start = clock();
print fib(20);
print clock() - start;