diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-29 20:46:34 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-29 20:46:34 -0700 |
commit | 8d4c2a095f94fe88d793f575825ba576676fc1a1 (patch) | |
tree | 01112291707c60f25a408a1aee67caae9ece5493 | |
parent | 08f013ffee9dbc63673c5712be1672b38bb5791a (diff) | |
download | mu-8d4c2a095f94fe88d793f575825ba576676fc1a1.tar.gz |
1893
-rw-r--r-- | Readme.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Readme.md b/Readme.md index 11087bb9..290756d1 100644 --- a/Readme.md +++ b/Readme.md @@ -256,17 +256,17 @@ inserting code at them. after +base-case [ # if n=0 return 1 - zero?:boolean <- equal n:number, 0 - break-unless zero?:boolean + zero?:boolean <- equal n, 0 + break-unless zero? reply 1 ] after +recursive-case [ # return n * factorial(n-1) - x:number <- subtract n:number, 1 - subresult:number <- factorial x:number - result:number <- multiply subresult:number, n:number - reply result:number + x:number <- subtract n, 1 + subresult:number <- factorial x + result:number <- multiply subresult, n + reply result ] ``` |