aboutsummaryrefslogtreecommitdiffstats
path: root/test/ack.tpr
diff options
context:
space:
mode:
Diffstat (limited to 'test/ack.tpr')
-rw-r--r--test/ack.tpr8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ack.tpr b/test/ack.tpr
new file mode 100644
index 0000000..1fe38d5
--- /dev/null
+++ b/test/ack.tpr
@@ -0,0 +1,8 @@
+(def ack
+ (fn (m n)
+ (if (= 0 m) (+ n 1)
+ (= 0 n) (ack (- m 1) 1)
+ (ack (- m 1) (ack m (- n 1))))))
+
+(ack 3 10)
+