about summary refs log tree commit diff stats
path: root/apps/factorial.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-05-24 19:46:47 -0700
committerKartik Agaram <vc@akkartik.com>2020-05-24 19:46:47 -0700
commit27b1e19ebec31eca1d29c4b8f18408b02c172578 (patch)
tree3497d9179793503de0783c05a444f1c6e3fb6fa3 /apps/factorial.mu
parent1eecd0934f7bda8afbd40c5594d809a464057054 (diff)
downloadmu-27b1e19ebec31eca1d29c4b8f18408b02c172578.tar.gz
6392 - 'length' instruction done in all complexity
Diffstat (limited to 'apps/factorial.mu')
-rw-r--r--apps/factorial.mu4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/factorial.mu b/apps/factorial.mu
index 55bee98e..e498cae1 100644
--- a/apps/factorial.mu
+++ b/apps/factorial.mu
@@ -35,8 +35,8 @@ fn main args: (addr array string) -> exit-status/ebx: int {
   var a/eax: (addr array string) <- copy args
   var tmp/ecx: int <- length a
   $main-body: {
-    # if (len(args) <= 4) factorial(5)
-    compare tmp, 4
+    # if (len(args) <= 1) factorial(5)
+    compare tmp, 1
     {
       break-if->
       var tmp/eax: int <- factorial 5