implementing native functions (ch24)

This commit is contained in:
2024-08-29 08:28:08 +02:00
parent 3daa675f8d
commit a2200debb4
7 changed files with 94 additions and 4 deletions

9
samples/ch24_fib.lox Normal file
View File

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