tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
This commit is contained in:
parent
ac9c1cd6b9
commit
e80465dacf
372 changed files with 4486 additions and 4486 deletions
|
|
@ -2,20 +2,20 @@ discard """
|
|||
file: "tack.nim"
|
||||
output: "125"
|
||||
"""
|
||||
# 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
|
||||
# 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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue