Skip to content

Commit

Permalink
fix example/ackermann.pn
Browse files Browse the repository at this point in the history
arithmetic is whitespace sensitive: m-1. fixme
  • Loading branch information
Reini Urban committed Nov 17, 2014
1 parent 305f5d5 commit 705e97e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions example/ackermann.pn
@@ -1,14 +1,13 @@
ack = (m, n):
if (m == 0): n + 1.
elsif (n == 0): ack(m-1, 1).
else: ack(m-1, ack(m, n-1)).
elsif (n == 0): ack(m - 1, 1).
else: ack(m - 1, ack(m, n - 1)).
.

# crashes
ack(3,4) say
#ack(3,4) say

3 times(m):
6 times(n):
4 times(m):
7 times(n):
ack(m, n) print
" " print
.
Expand Down

0 comments on commit 705e97e

Please sign in to comment.