about summary refs log tree commit diff stats
path: root/mu.arc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-07-11 21:22:32 -0700
committerKartik K. Agaram <vc@akkartik.com>2014-07-11 21:22:32 -0700
commit77f8e6cd2534fb7c63b0021b7adcd1a2b8348402 (patch)
tree2e1436a88c6d3306aa585ec7a87dd3b558f6abef /mu.arc
parentff8b3afd095b9341dec55f7e54c2b0ae9a989931 (diff)
downloadmu-77f8e6cd2534fb7c63b0021b7adcd1a2b8348402.tar.gz
15
Diffstat (limited to 'mu.arc')
-rw-r--r--mu.arc14
1 files changed, 10 insertions, 4 deletions
diff --git a/mu.arc b/mu.arc
index 4ed77070..78d2f654 100644
--- a/mu.arc
+++ b/mu.arc
@@ -8,6 +8,11 @@
   (= function* (table)))
 (clear)
 
+(mac aelse (test else . body)
+  `(aif ,test
+      (do ,@body)
+      ,else))
+
 (def add-fns (fns)
   (each (name . body) fns
     (= function*.name body)))
@@ -52,11 +57,12 @@
                 (do (= result arg)
                     (break))
               ; else user-defined function
-                (let results (run function*.op arg)
+                (aelse function*.op (prn "no definition for " op)
 ;?                   (prn "== " memory*)
-                  (each o oarg
-;?                     (prn o)
-                    (= (memory* o.1) (memory* pop.results.1))))
+                  (let results (run it arg)
+                    (each o oarg
+;?                       (prn o)
+                      (= (memory* o.1) (memory* pop.results.1)))))
               )))))
 ;?     (prn "return " result)
     ))