From 76755b2836b0dadd88f82635f661f9d9df77604d Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 10 Nov 2015 21:35:42 -0800 Subject: 2423 - describe shape-shifting in html docs --- html/counters.mu.html | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'html/counters.mu.html') 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; } --> @@ -32,18 +31,16 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } # example program: maintain multiple counters with isolated lexical scopes # (spaces) -recipe new-counter [ - default-space:address:array:location <- new location:type, 30 - n:number <- next-ingredient - reply default-space +recipe new-counter n:number -> default-space:address:array:location [ + default-space <- new location:type, 30 + load-ingredients ] -recipe increment-counter [ +recipe increment-counter outer:address:array:location/names:new-counter, x:number -> n:number/space:1 [ local-scope - 0:address:array:location/names:new-counter <- next-ingredient # setup outer space; it *must* come from 'new-counter' - x:number <- next-ingredient - n:number/space:1 <- add n:number/space:1, x - reply n:number/space:1 + load-ingredients + 0:address:array:location/names:new-counter <- copy outer # setup outer space; it *must* come from 'new-counter' + n/space:1 <- add n/space:1, x ] recipe main [ -- cgit 1.4.1-2-gfad0