summaryrefslogtreecommitdiff
path: root/examples/hanoi.lali
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hanoi.lali')
-rw-r--r--examples/hanoi.lali8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/hanoi.lali b/examples/hanoi.lali
index cf82382..59e3d10 100644
--- a/examples/hanoi.lali
+++ b/examples/hanoi.lali
@@ -7,15 +7,15 @@
(newline))
(defun hanoi-move (num from to via)
- (fill ((! num 1)
+ (fill ((dif num +1)
(hanoi-print num from to))
(f
(prog
- (hanoi-move (- num 1) from via to)
+ (hanoi-move (- num +1) from via to)
(hanoi-print num from to)
- (hanoi-move (- num 1) via to from)))))
+ (hanoi-move (- num +1) via to from)))))
(defun hanoi (num)
(hanoi-move num 'L 'M 'R))
-(hanoi 3)
+(hanoi +3)