about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--073list.mu10
-rw-r--r--075duplex_list.mu4
2 files changed, 6 insertions, 8 deletions
diff --git a/073list.mu b/073list.mu
index 6f27a7a8..9881d85b 100644
--- a/073list.mu
+++ b/073list.mu
@@ -8,16 +8,15 @@ container list:_elem [
   next:address:list:_elem
 ]
 
-# should I say in/contained-in:result, allow ingredients to refer to products?
-recipe push x:_elem, in:address:list:_elem -> result:address:list:_elem [
+recipe push x:_elem, in:address:list:_elem -> in:address:list:_elem [
   local-scope
   load-ingredients
-  result <- new {(list _elem): type}
+  result:address:list:_elem <- new {(list _elem): type}
   val:address:_elem <- get-address *result, value:offset
   *val <- copy x
   next:address:address:list:_elem <- get-address *result, next:offset
   *next <- copy in
-  reply result
+  reply result  # needed explicitly because we need to replace 'in' with 'result'
 ]
 
 recipe first in:address:list:_elem -> result:_elem [
@@ -26,8 +25,7 @@ recipe first in:address:list:_elem -> result:_elem [
   result <- get *in, value:offset
 ]
 
-# result:address:list <- rest in:address:list
-recipe rest in:address:list:_elem -> result:address:list:_elem [
+recipe rest in:address:list:_elem -> result:address:list:_elem/contained-in:in [
   local-scope
   load-ingredients
   result <- get *in, next:offset
diff --git a/075duplex_list.mu b/075duplex_list.mu
index 1f00a0cf..317fa1ac 100644
--- a/075duplex_list.mu
+++ b/075duplex_list.mu
@@ -30,14 +30,14 @@ recipe first in:address:duplex-list:_elem -> result:_elem [
   result <- get *in, value:offset
 ]
 
-recipe next in:address:duplex-list:_elem -> result:address:duplex-list:_elem [
+recipe next in:address:duplex-list:_elem -> result:address:duplex-list:_elem/contained-in:in [
   local-scope
   load-ingredients
   reply-unless in, 0
   result <- get *in, next:offset
 ]
 
-recipe prev in:address:duplex-list:_elem -> result:address:duplex-list:_elem [
+recipe prev in:address:duplex-list:_elem -> result:address:duplex-list:_elem/contained-in:in [
   local-scope
   load-ingredients
   reply-unless in, 0