Function tests in interpretation

This commit is contained in:
Dmitry Boulytchev 2018-04-03 08:05:10 +03:00
parent 44b8a96e34
commit 784cc6510d
7 changed files with 65 additions and 1 deletions

12
regression/test032.expr Normal file
View file

@ -0,0 +1,12 @@
fun ack (m, n) {
if m == 0 then return n+1
elif m > 0 && n == 0 then return ack (m-1, 1)
else return ack (m-1, ack (m, n-1))
fi
}
for m := 0, m <= 3, m := m+1 do
for n := 0, n <= 8, n := n+1 do
write (ack (m, n))
od
od