about summary refs log tree commit diff stats
path: root/html/counters.mu.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/counters.mu.html')
-rw-r--r--html/counters.mu.html17
1 files changed, 7 insertions, 10 deletions
diff --git a/html/counters.mu.html b/html/counters.mu.html
index 9a02adca..495def81 100644
--- a/html/counters.mu.html
+++ b/html/counters.mu.html
@@ -17,7 +17,6 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; }
 .Comment { color: #9090ff; }
 .Constant { color: #00a0a0; }
 .Special { color: #ff6060; }
-.muControl { color: #c0a020; }
 -->
 </style>
 
@@ -32,18 +31,16 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; }
 <span class="Comment"># example program: maintain multiple counters with isolated lexical scopes</span>
 <span class="Comment"># (spaces)</span>
 
-<span class="muRecipe">recipe</span> new-counter [
-  <span class="Constant">default-space</span>:address:array:location<span class="Special"> &lt;- </span>new <span class="Constant">location:type</span>, <span class="Constant">30</span>
-  n:number<span class="Special"> &lt;- </span><span class="Constant">next-ingredient</span>
-  <span class="muControl">reply</span> <span class="Constant">default-space</span>
+<span class="muRecipe">recipe</span> new-counter n:number<span class="muRecipe"> -&gt; </span><span class="Constant">default-space</span>:address:array:location [
+  <span class="Constant">default-space</span><span class="Special"> &lt;- </span>new <span class="Constant">location:type</span>, <span class="Constant">30</span>
+  <span class="Constant">load-ingredients</span>
 ]
 
-<span class="muRecipe">recipe</span> increment-counter [
+<span class="muRecipe">recipe</span> increment-counter outer:address:array:location/names:new-counter, x:number<span class="muRecipe"> -&gt; </span>n:number/space:<span class="Constant">1</span> [
   <span class="Constant">local-scope</span>
-  <span class="Constant">0</span>:address:array:location/names:new-counter<span class="Special"> &lt;- </span><span class="Constant">next-ingredient</span>  <span class="Comment"># setup outer space; it *must* come from 'new-counter'</span>
-  x:number<span class="Special"> &lt;- </span><span class="Constant">next-ingredient</span>
-  n:number/space:<span class="Constant">1</span><span class="Special"> &lt;- </span>add n:number/space:<span class="Constant">1</span>, x
-  <span class="muControl">reply</span> n:number/space:<span class="Constant">1</span>
+  <span class="Constant">load-ingredients</span>
+  <span class="Constant">0</span>:address:array:location/names:new-counter<span class="Special"> &lt;- </span>copy outer  <span class="Comment"># setup outer space; it *must* come from 'new-counter'</span>
+  n/space:<span class="Constant">1</span><span class="Special"> &lt;- </span>add n/space:<span class="Constant">1</span>, x
 ]
 
 <span class="muRecipe">recipe</span> main [