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.mu8
1 files changed, 2 insertions, 6 deletions
diff --git a/factorial.mu b/factorial.mu
index 8a261207..5b43d151 100644
--- a/factorial.mu
+++ b/factorial.mu
@@ -10,12 +10,8 @@ def main [
 def factorial n:num -> result:num [
   local-scope
   load-ingredients
-  {
-    # if n=0 return 1
-    zero?:bool <- equal n, 0
-    break-unless zero?
-    return 1
-  }
+  # if n=0 return 1
+  return-unless n, 1
   # return n * factorial(n-1)
   x:num <- subtract n, 1
   subresult:num <- factorial x