diff options
Diffstat (limited to 'html/factorial.mu.html')
-rw-r--r-- | html/factorial.mu.html | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/html/factorial.mu.html b/html/factorial.mu.html index 31ac9c26..db6840b9 100644 --- a/html/factorial.mu.html +++ b/html/factorial.mu.html @@ -40,9 +40,9 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } <span class="Constant">]</span> ] -<span class="muRecipe">recipe</span> factorial [ +<span class="muRecipe">recipe</span> factorial n:number<span class="muRecipe"> -> </span>result:number [ <span class="Constant">local-scope</span> - n:number<span class="Special"> <- </span><span class="Constant">next-ingredient</span> + <span class="Constant">load-ingredients</span> <span class="Delimiter">{</span> <span class="Comment"># if n=0 return 1</span> zero?:boolean<span class="Special"> <- </span>equal n, <span class="Constant">0</span> @@ -52,8 +52,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } <span class="Comment"># return n * factorial(n-1)</span> x:number<span class="Special"> <- </span>subtract n, <span class="Constant">1</span> subresult:number<span class="Special"> <- </span>factorial x - result:number<span class="Special"> <- </span>multiply subresult, n - <span class="muControl">reply</span> result + result<span class="Special"> <- </span>multiply subresult, n ] <span class="Comment"># unit test</span> |