From 4690ce81e079fc58cae8d6d583e5e3eb3ed81a83 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 9 Mar 2016 02:56:27 -0800 Subject: 2743 Looks like "TOhtml | " doesn't work on Mac OS X for some reason.. --- html/factorial.mu.html | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'html/factorial.mu.html') diff --git a/html/factorial.mu.html b/html/factorial.mu.html index db6840b9..c0e930a7 100644 --- a/html/factorial.mu.html +++ b/html/factorial.mu.html @@ -3,51 +3,43 @@ Mu - factorial.mu - - + + - - + - - -
+
 # example program: compute the factorial of 5
 
-recipe main [
+def main [
   local-scope
   x:number <- factorial 5
   $print [result: ], x, [ 
 ]
 ]
 
-recipe factorial n:number -> result:number [
+def factorial n:number -> result:number [
   local-scope
   load-ingredients
   {
     # if n=0 return 1
     zero?:boolean <- equal n, 0
     break-unless zero?
-    reply 1
+    return 1
   }
   # return n * factorial(n-1)
   x:number <- subtract n, 1
@@ -67,4 +59,3 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; }
 
- -- cgit 1.4.1-2-gfad0