Returning from calls 10.5.1

This commit is contained in:
nazrin 2025-06-02 00:06:31 +00:00
parent 10cc5e6e89
commit 7f4946f1e9
10 changed files with 196 additions and 23 deletions

11
test/fib10.lox Normal file
View file

@ -0,0 +1,11 @@
fun fib(n){
if(n <= 1)
return n;
return fib(n - 2) + fib(n - 1);
}
for(var i = 0; i < 10; i = i + 1){
print fib(i);
}