From 5fdd28fe0e97e8cff9d847ba6d17009d4b288b78 Mon Sep 17 00:00:00 2001 From: Dane Johnson Date: Thu, 14 Nov 2024 15:49:37 -0600 Subject: [PATCH] Ackermann function --- demo/real.dee | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/demo/real.dee b/demo/real.dee index d40875a..4509197 100644 --- a/demo/real.dee +++ b/demo/real.dee @@ -8,3 +8,12 @@ fizzbuzz <- -> ) fizzbuzz() + +print() + +ack <- m -> n -> + if m = 0 n + 1 + elif n = 0 ack(m - 1, 1) + else ack(m - 1, ack(m, n - 1)) + +print(ack(3, 4)) ## 125