about summary refs log tree commit diff stats
path: root/factorial.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-17 00:43:13 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-17 00:43:20 -0700
commit192d59d3bb9ee0baa1afd82cb5d0f352bdc6e403 (patch)
tree56ade9284cbd296ade90601a3a047c5cbdf3428c /factorial.mu
parent08f4628e8b858120fe3547d8e5431d9abfe46bf8 (diff)
downloadmu-192d59d3bb9ee0baa1afd82cb5d0f352bdc6e403.tar.gz
3380
One more place we were missing expanding type abbreviations: inside
container definitions.
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 14e85140..eaf905c6 100644
--- a/factorial.mu
+++ b/factorial.mu
@@ -2,12 +2,12 @@
 
 def main [
   local-scope
-  x:number <- factorial 5
+  x:num <- factorial 5
   $print [result: ], x, [ 
 ]
 ]
 
-def factorial n:number -> result:number [
+def factorial n:num -> result:num [
   local-scope
   load-ingredients
   {
@@ -17,15 +17,15 @@ def factorial n:number -> result:number [
     return 1
   }
   # return n * factorial(n-1)
-  x:number <- subtract n, 1
-  subresult:number <- factorial x
+  x:num <- subtract n, 1
+  subresult:num <- factorial x
   result <- multiply subresult, n
 ]
 
 # unit test
 scenario factorial-test [
   run [
-    1:number <- factorial 5
+    1:num <- factorial 5
   ]
   memory-should-contain [
     1 <- 120