From 204dae921abff0c70e017215bb3c91fa6ca11aff Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 26 Dec 2016 11:44:14 -0800 Subject: 3710 Turns out we don't need to explicitly add anchors for each line. Vim's TOhtml has magic for that out of the box. --- html/counters.mu.html | 58 +++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'html/counters.mu.html') diff --git a/html/counters.mu.html b/html/counters.mu.html index d34109d3..5d734383 100644 --- a/html/counters.mu.html +++ b/html/counters.mu.html @@ -52,35 +52,35 @@ if ('onhashchange' in window) {
- 1 # example program: maintain multiple counters with isolated lexical scopes
- 2 # (spaces)
- 3 
- 4 def new-counter n:num -> default-space:space [
- 5   default-space <- new location:type, 30
- 6   load-ingredients
- 7 ]
- 8 
- 9 def increment-counter outer:space/names:new-counter, x:num -> n:num/space:1 [
-10   local-scope
-11   load-ingredients
-12   0:space/names:new-counter <- copy outer  # setup outer space; it *must* come from 'new-counter'
-13   n/space:1 <- add n/space:1, x
-14 ]
-15 
-16 def main [
-17   local-scope
-18   # counter A
-19   a:space <- new-counter 34
-20   # counter B
-21   b:space <- new-counter 23
-22   # increment both by 2 but in different ways
-23   increment-counter a, 1
-24   b-value:num <- increment-counter b, 2
-25   a-value:num <- increment-counter a, 1
-26   # check results
-27   $print [Contents of counters], 10/newline
-28   $print [a: ], a-value, [ b: ], b-value,  10/newline
-29 ]
+ 1 # example program: maintain multiple counters with isolated lexical scopes
+ 2 # (spaces)
+ 3 
+ 4 def new-counter n:num -> default-space:space [
+ 5   default-space <- new location:type, 30
+ 6   load-ingredients
+ 7 ]
+ 8 
+ 9 def increment-counter outer:space/names:new-counter, x:num -> n:num/space:1 [
+10   local-scope
+11   load-ingredients
+12   0:space/names:new-counter <- copy outer  # setup outer space; it *must* come from 'new-counter'
+13   n/space:1 <- add n/space:1, x
+14 ]
+15 
+16 def main [
+17   local-scope
+18   # counter A
+19   a:space <- new-counter 34
+20   # counter B
+21   b:space <- new-counter 23
+22   # increment both by 2 but in different ways
+23   increment-counter a, 1
+24   b-value:num <- increment-counter b, 2
+25   a-value:num <- increment-counter a, 1
+26   # check results
+27   $print [Contents of counters], 10/newline
+28   $print [a: ], a-value, [ b: ], b-value,  10/newline
+29 ]
 
-- cgit 1.4.1-2-gfad0