about summary refs log tree commit diff stats
path: root/shell
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-06-06 16:39:07 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-06-06 16:39:07 -0700
commit86f97442575ec383bbed314df662c897b3b11688 (patch)
treeb9f5383f8b61df30c543f31c1a91eb207c5f6526 /shell
parent4c07de4d3bd28083e83642fe5b98262bedbaa2ea (diff)
downloadmu-86f97442575ec383bbed314df662c897b3b11688.tar.gz
.
Diffstat (limited to 'shell')
-rw-r--r--shell/data.limg8
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/data.limg b/shell/data.limg
index c85dd050..7ef4b055 100644
--- a/shell/data.limg
+++ b/shell/data.limg
@@ -5,6 +5,10 @@
     (def . [(mac (def (name . params) . body)
   `(define ,name (fn ,params ,@body)))])
     (do . [(mac (do . body) `((fn () ,@body)))])
+    (let . [(mac (let var val . body)
+  `((fn (,var) ,@body) ,val))])
+    (when . [(mac (when cond . body)
+  `(if ,cond (do ,@body) ()))])
     (list . [(def (list . args) args)])
     (len . [(def (len l)
   (if (no l)
@@ -15,10 +19,6 @@
     ()
     (cons (f (car xs))
           (map1 f (cdr xs)))))])
-    (let . [(mac (let var val . body)
-  `((fn (,var) ,@body) ,val))])
-    (when . [(mac (when cond . body)
-  `(if ,cond (do ,@body) ()))])
     (++ . [(mac (++ var) `(set ,var (+ ,var 1)))])
     (+= . [(mac (+= var inc)
   `(set ,var (+ ,var ,inc)))])