summaryrefslogtreecommitdiffstats
path: root/test/ack.t
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/ack.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ack.t b/test/ack.t
new file mode 100644
index 0000000..f9d892c
--- /dev/null
+++ b/test/ack.t
@@ -0,0 +1,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