about summary refs log tree commit diff stats
path: root/mu.arc.t
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-07-06 02:35:45 -0700
committerKartik K. Agaram <vc@akkartik.com>2014-07-06 02:35:45 -0700
commit40f0a658f0b24f7231886ac61758f42e4b088742 (patch)
treed289ac16313784241da05989c1990c0fec21847c /mu.arc.t
parentceb4710530f280d1051aaa744e086dfe9c7803b3 (diff)
downloadmu-40f0a658f0b24f7231886ac61758f42e4b088742.tar.gz
7
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t19
1 files changed, 19 insertions, 0 deletions
diff --git a/mu.arc.t b/mu.arc.t
index 7c05cefa..88dbde68 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -76,3 +76,22 @@
                        ; add-fn's temporaries
                        4 1  5 3  6 4))
   (prn "F - parameterized compound fn with return value"))
+
+(clear)
+(add-fns
+  '((add-fn
+      (4 <- read)
+      (5 <- read)
+      (6 <- add 4 5)
+      (return 6 5)
+      (4 <- loadi 34))
+    (main
+      (1 <- loadi 1)
+      (2 <- loadi 3)
+      (3 7 <- add-fn 1 2))))
+(run function*!main)
+;? (prn memory*)
+(if (~iso memory* (obj 1 1  2 3  3 4    7 3
+                         ; add-fn's temporaries
+                         4 1  5 3  6 4))
+  (prn "F - parameterized compound fn with multiple return values"))