about summary refs log tree commit diff stats
path: root/tangle.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 /tangle.mu
parent08f4628e8b858120fe3547d8e5431d9abfe46bf8 (diff)
downloadmu-192d59d3bb9ee0baa1afd82cb5d0f352bdc6e403.tar.gz
3380
One more place we were missing expanding type abbreviations: inside
container definitions.
Diffstat (limited to 'tangle.mu')
-rw-r--r--tangle.mu10
1 files changed, 5 insertions, 5 deletions
diff --git a/tangle.mu b/tangle.mu
index 0fd1599a..3a17b911 100644
--- a/tangle.mu
+++ b/tangle.mu
@@ -6,7 +6,7 @@
 # This isn't a very tasteful example, just a simple demonstration of
 # possibilities.
 
-def factorial n:number -> result:number [
+def factorial n:num -> result:num [
   local-scope
   load-ingredients
   {
@@ -24,14 +24,14 @@ after <base-case> [
 
 after <recursive-case> [
   # 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
 ]
 
 def main [
-  1:number <- factorial 5
+  1:num <- factorial 5
   # trailing space in next line is to help with syntax highlighting
-  $print [result: ], 1:number, [ 
+  $print [result: ], 1:num, [ 
 ]
 ]