diff options
-rw-r--r-- | tangle.mu | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tangle.mu b/tangle.mu index b9d05bee..88722185 100644 --- a/tangle.mu +++ b/tangle.mu @@ -10,19 +10,19 @@ recipe factorial [ local-scope n:number <- next-ingredient { - +base-case + <base-case> } - +recursive-case + <recursive-case> ] -after +base-case [ +after <base-case> [ # if n=0 return 1 zero?:boolean <- equal n, 0 break-unless zero? reply 1 ] -after +recursive-case [ +after <recursive-case> [ # return n * factorial(n - 1) x:number <- subtract n, 1 subresult:number <- factorial x |