about summary refs log tree commit diff stats
path: root/html/counters.mu.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-10 21:35:42 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-10 21:43:45 -0800
commit76755b2836b0dadd88f82635f661f9d9df77604d (patch)
treef4f4429510c739fd1f9e51edd10e03c27107acba /html/counters.mu.html
parent080e9cb73fa55cdc862f1dd7593df56e0a6302b8 (diff)
downloadmu-76755b2836b0dadd88f82635f661f9d9df77604d.tar.gz
2423 - describe shape-shifting in html docs
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 [