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/tangle.mu.html | 74 ++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'html/tangle.mu.html') diff --git a/html/tangle.mu.html b/html/tangle.mu.html index 9a21434e..da976f78 100644 --- a/html/tangle.mu.html +++ b/html/tangle.mu.html @@ -54,43 +54,43 @@ if ('onhashchange' in window) {
- 1 # example program: constructing functions out of order
- 2 #
- 3 # We construct a factorial function with separate base and recursive cases.
- 4 # Compare factorial.mu.
- 5 #
- 6 # This isn't a very tasteful example, just a simple demonstration of
- 7 # possibilities.
- 8 
- 9 def factorial n:num -> result:num [
-10   local-scope
-11   load-ingredients
-12   {
-13     <base-case>
-14   }
-15   <recursive-case>
-16 ]
-17 
-18 after <base-case> [
-19   # if n=0 return 1
-20   zero?:bool <- equal n, 0
-21   break-unless zero?
-22   return 1
-23 ]
-24 
-25 after <recursive-case> [
-26   # return n * factorial(n - 1)
-27   x:num <- subtract n, 1
-28   subresult:num <- factorial x
-29   result <- multiply subresult, n
-30 ]
-31 
-32 def main [
-33   1:num <- factorial 5
-34   # trailing space in next line is to help with syntax highlighting
-35   $print [result: ], 1:num, [ 
-36 ]
-37 ]
+ 1 # example program: constructing functions out of order
+ 2 #
+ 3 # We construct a factorial function with separate base and recursive cases.
+ 4 # Compare factorial.mu.
+ 5 #
+ 6 # This isn't a very tasteful example, just a simple demonstration of
+ 7 # possibilities.
+ 8 
+ 9 def factorial n:num -> result:num [
+10   local-scope
+11   load-ingredients
+12   {
+13     <base-case>
+14   }
+15   <recursive-case>
+16 ]
+17 
+18 after <base-case> [
+19   # if n=0 return 1
+20   zero?:bool <- equal n, 0
+21   break-unless zero?
+22   return 1
+23 ]
+24 
+25 after <recursive-case> [
+26   # return n * factorial(n - 1)
+27   x:num <- subtract n, 1
+28   subresult:num <- factorial x
+29   result <- multiply subresult, n
+30 ]
+31 
+32 def main [
+33   1:num <- factorial 5
+34   # trailing space in next line is to help with syntax highlighting
+35   $print [result: ], 1:num, [ 
+36 ]
+37 ]
 
-- cgit 1.4.1-2-gfad0