about summary refs log tree commit diff stats
path: root/shell
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-08-01 10:22:16 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-01 10:22:16 -0700
commit15b1c2651c9f0ef00e6018bc07db3ae91e5af455 (patch)
tree0f4703d00ac43b6aa8e6c6a78b4fdfd2ec3f9f79 /shell
parentb625c6304eca827c04eda719fa6f7927294b80bc (diff)
downloadmu-15b1c2651c9f0ef00e6018bc07db3ae91e5af455.tar.gz
.
Diffstat (limited to 'shell')
-rw-r--r--shell/data.limg4
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/data.limg b/shell/data.limg
index ace492f6..03aa276d 100644
--- a/shell/data.limg
+++ b/shell/data.limg
@@ -40,6 +40,7 @@
     (cadr . [define cadr (compose car cdr)])
     (cddr . [define cddr (compose cdr cdr)])
     (cdar . [define cdar (compose cdr car)])
+    (val . [define val cadr])
     (some . [def (some f xs)
   if (no xs)
     ()
@@ -112,9 +113,10 @@
   aif (assoc alist key)
     (cdr it)
     ()])
-    (++ . [mac (++ var) `(set ,var (,var + 1))])
     (+= . [mac (var += inc)
   `(set ,var (,var + ,inc))])
+    (++ . [mac (++ var)
+  `(+= ,var 1)])
     (for . [mac (for var init test update . body)
   `(let ,var ,init
      (while ,test