aboutsummaryrefslogtreecommitdiff
path: root/neighborcat
diff options
context:
space:
mode:
authormryouse2022-07-09 01:57:46 +0000
committermryouse2022-07-09 01:57:46 +0000
commit5dc837bfc3412b70e9008cf38e6226a61afbcaa3 (patch)
tree8342c273b5e7a961db955c5d87b3999d10cfd63a /neighborcat
parentbe92c4e2bdfec7125a0fac1a81842047efbd1d50 (diff)
remove 'with-write' blocks, those will come with macros(?)
Diffstat (limited to 'neighborcat')
-rw-r--r--neighborcat/neighborcat.neb9
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 ()