about summary refs log tree commit diff stats
path: root/mu.arc.t
diff options
context:
space:
mode:
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t23
1 files changed, 22 insertions, 1 deletions
diff --git a/mu.arc.t b/mu.arc.t
index 6f51cda9..7c05cefa 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -36,6 +36,7 @@
 ;? (prn memory*)
 (if (~iso memory* (obj 1 1  2 3  3 4))
   (prn "F - early return works"))
+;? (quit)
 
 (clear)
 (add-fns
@@ -48,10 +49,30 @@
     (main
       (1 <- loadi 1)
       (2 <- loadi 3)
-      (add-fn 1 2))))
+      (add-fn 1 2)
+    )))
 (run function*!main)
 ;? (prn memory*)
 (if (~iso memory* (obj 1 1  2 3  3 4
                        ; add-fn's temporaries
                        4 1  5 3))
   (prn "F - parameterized compound fn"))
+
+(clear)
+(add-fns
+  '((add-fn
+      (4 <- read)
+      (5 <- read)
+      (6 <- add 4 5)
+      (return 6)
+      (4 <- loadi 34))
+    (main
+      (1 <- loadi 1)
+      (2 <- loadi 3)
+      (3 <- add-fn 1 2))))
+(run function*!main)
+;? (prn memory*)
+(if (~iso memory* (obj 1 1  2 3  3 4
+                       ; add-fn's temporaries
+                       4 1  5 3  6 4))
+  (prn "F - parameterized compound fn with return value"))