aboutsummaryrefslogtreecommitdiff
path: root/cipher/viewer.neb
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/viewer.neb')
-rw-r--r--cipher/viewer.neb10
1 files changed, 5 insertions, 5 deletions
diff --git a/cipher/viewer.neb b/cipher/viewer.neb
index 1888b76..8239d79 100644
--- a/cipher/viewer.neb
+++ b/cipher/viewer.neb
@@ -26,10 +26,10 @@
(func save-and-exit (cipher codex)
(print "in save-and-exit")
- (with-write "progress.txt"
- (write (concat cipher (newline)) _file_)
- (for-each codex
- (write (concat (first _item_) " " (first (rest _item_)) (newline)) _file_)))
+ (def prog (open-write "progress.txt"))
+ (write (concat cipher "\n") prog)
+ (for-each codex
+ (write (concat (first _item_) " " (first (rest _item_)) "\n") prog))
(exit))
(func loop (cipher codex)
@@ -44,7 +44,7 @@
(branch
((eq? "quit" (first inp)) (exit))
((eq? "save" (first inp)) (save-and-exit cipher cur))
- ((> (list-length inp) 2) (exit))
+ ((> (length inp) 2) (exit))
((and (empty? (rest inp)) (in? (first inp) (keys cur)))
(redef cur (remove cur (first inp))))
((in? (first inp) (keys codex))