Ackermann function
This commit is contained in:
parent
74f1fdc5ea
commit
5fdd28fe0e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user