Ackermann function

This commit is contained in:
Dane Johnson 2024-11-14 15:49:37 -06:00
parent 74f1fdc5ea
commit 5fdd28fe0e

View File

@ -8,3 +8,12 @@ fizzbuzz <- ->
) )
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