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














                                                        
fun main[n,m]
	print call ack[n,m]
end

fun ack[n,m]
	if n == 0
		@m + 1
	else
		if m == 0
			@call ack[n-1, 1]
		else
			@call ack[n-1, call ack[n, m-1]]
		end
	end
end