From 97eb971b7574b3f283d7111a567a301faec9912d Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 27 Dec 2016 22:20:43 -0800 Subject: 3725 More improvements to cross-linking example programs. Include their own functions as well in the tags for each program, even as you share the core .mu files everywhere. --- html/factorial.mu.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'html/factorial.mu.html') diff --git a/html/factorial.mu.html b/html/factorial.mu.html index 04ab8228..1133ccfe 100644 --- a/html/factorial.mu.html +++ b/html/factorial.mu.html @@ -59,14 +59,14 @@ if ('onhashchange' in window) {
  1 # example program: compute the factorial of 5
  2 
- 3 def main [
+ 3 def main [
  4   local-scope
- 5   x:num <- factorial 5
+ 5   x:num <- factorial 5
  6   $print [result: ], x, [ 
  7 ]
  8 ]
  9 
-10 def factorial n:num -> result:num [
+10 def factorial n:num -> result:num [
 11   local-scope
 12   load-ingredients
 13   {
@@ -77,14 +77,14 @@ if ('onhashchange' in window) {
 18   }
 19   # return n * factorial(n-1)
 20   x:num <- subtract n, 1
-21   subresult:num <- factorial x
+21   subresult:num <- factorial x
 22   result <- multiply subresult, n
 23 ]
 24 
 25 # unit test
 26 scenario factorial-test [
 27   run [
-28     1:num <- factorial 5
+28     1:num <- factorial 5
 29   ]
 30   memory-should-contain [
 31     1 <- 120
-- 
cgit 1.4.1-2-gfad0

lines'>