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