diff options
| -rw-r--r-- | neighborcat/neighborcat.neb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/neighborcat/neighborcat.neb b/neighborcat/neighborcat.neb index 1c3b02a..5a2d5c2 100644 --- a/neighborcat/neighborcat.neb +++ b/neighborcat/neighborcat.neb @@ -75,9 +75,10 @@ ; go to the porch (def target-eats-stem (last (split target-eats "/"))) (def target-porch (user-from-path target-eats)) - (with-write (concat HOME target-porch PORCH NAME) - (write CAT _file_) - (write (concat "thank you for the " target-eats-stem "!\n") _file_))) + (def cat-file (open-write (concat HOME target-porch PORCH NAME))) + (write CAT cat-file) + (write (concat "thank you for the " target-eats-stem "!\n") cat-file) + (close cat-file)) (func init () ; create the new porch and bowl @@ -110,7 +111,7 @@ (block (print (concat "you already have " (first food) " in your bowl!")) (exit))) - (with-write (concat HOME USER BOWL "/" (first food))) + (close (open-write (concat HOME USER BOWL "/" (first food)))) (print (concat "you left some " (first food) " for " NAME "!"))) (func help () |
