about summary refs log tree commit diff stats
path: root/factorial.mu
diff options
context:
space:
mode:
Diffstat (limited to 'factorial.mu')
-rw-r--r--factorial.mu10
1 files changed, 5 insertions, 5 deletions
diff --git a/factorial.mu b/factorial.mu
index 6448bff1..23c247e0 100644
--- a/factorial.mu
+++ b/factorial.mu
@@ -2,7 +2,7 @@
 
 recipe main [
   local-scope
-  x:number <- factorial 5:literal
+  x:number <- factorial 5
   $print [result: ], x:number, [ 
 ]
 ]
@@ -12,12 +12,12 @@ recipe factorial [
   n:number <- next-ingredient
   {
     # if n=0 return 1
-    zero?:boolean <- equal n:number, 0:literal
+    zero?:boolean <- equal n:number, 0
     break-unless zero?:boolean
-    reply 1:literal
+    reply 1
   }
   # return n * factorial(n-1)
-  x:number <- subtract n:number, 1:literal
+  x:number <- subtract n:number, 1
   subresult:number <- factorial x:number
   result:number <- multiply subresult:number, n:number
   reply result:number
@@ -26,7 +26,7 @@ recipe factorial [
 # unit test
 scenario factorial-test [
   run [
-    1:number <- factorial 5:literal
+    1:number <- factorial 5
   ]
   memory-should-contain [
     1 <- 120