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