about summary refs log tree commit diff
path: root/examples/8.src
blob: 67c7dc3bdbeb08ae7cd4914ebcdf678b9c7843a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
let fib = (n) => i64 {
	if n == 0 {
		return 0;
	};
	if n == 1 {
		return 1;
	};
	return fib(n-2) + fib(n-1);
};

let main = () => i64 {
	let result = fib(7);
	print(result);
	return result;
};