summaryrefslogblamecommitdiffstats
path: root/test/test1.t
blob: 12580bd547c43bb1bd2881b0ea04715781373a82 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                          

                 
   
fun fib[a]
	if a < 2
		@1
	end
	@( call fib[a-1] + call fib[a-2] )
end

# main function
fun main[]
	sum = 0
	i = 0
	while (i < 10)
		sum = sum + call fib[i]
		i = i + 1
	end
	print sum
	@0
end