diff options
| author | mryouse | 2022-07-21 23:59:31 +0000 |
|---|---|---|
| committer | mryouse | 2022-07-21 23:59:31 +0000 |
| commit | 48cf8f7804103672878d149279379691ec9af756 (patch) | |
| tree | d710aede11eea0fd4f6cc15b5abd9c0a1ed5a8aa /cipher/viewer.neb | |
| parent | c8e3cbb05b63e2bf9dfc215c7552a116e2f99714 (diff) | |
deprecate with-write and list-length
Diffstat (limited to 'cipher/viewer.neb')
| -rw-r--r-- | cipher/viewer.neb | 10 |
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)) |
