blob: 1ec46e48b4fb45644326b4f10c4fbdcf94eb4dc8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
let fib = (n) => {
if n {
return 0;
};
if n - 1 {
return 1;
};
return fib(n-2) + fib(n-1);
};
let main = () => {
let result = fib(7);
print(result);
return result;
};
|