diff options
Diffstat (limited to 'tests/accept/run/tack.nim')
-rwxr-xr-x | tests/accept/run/tack.nim | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/accept/run/tack.nim b/tests/accept/run/tack.nim deleted file mode 100755 index 59535e547..000000000 --- a/tests/accept/run/tack.nim +++ /dev/null @@ -1,15 +0,0 @@ -# the Ackermann function - -proc ack(x, y: int): int = - if x != 0: - if y != 0: - return ack(x-1, ack(x, y-1)) - return ack(x-1, 1) - else: - return y + 1 -# if x == 0: return y + 1 -# elif y == 0: return ack(x-1, 1) -# else: return ack(x-1, ack(x, y-1)) - -# echo(ack(0, 0)) -write(stdout, ack(3, 4)) #OUT 125 |