implement comments

This commit is contained in:
Matthieu Jolimaitre 2024-10-25 14:33:55 +02:00
parent 7febf91d3c
commit d3095d5980
2 changed files with 50 additions and 23 deletions

View file

@ -1,7 +1,9 @@
// recursion
fn fibo(n) {
if (n < 1) return n;
if (n <= 0) return 0;
if (n <= 1) return 1;
return fibo(n - 1) + fibo(n - 2);
}
fibo(3)
fibo(10)