summary refs log tree commit diff
path: root/examples/8.src
blob: 75b5c56a8b7215497c24aa5edcca600c62903d10 (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;
};