diff options
author | Camil Staps | 2018-04-03 20:06:13 +0200 |
---|---|---|
committer | Camil Staps | 2018-04-03 20:06:13 +0200 |
commit | b5917471efab37e60949b380a24ecc35e2946203 (patch) | |
tree | e1359698e10bad08ac2c32e625d062ba8773b83f /examples/fac.fusp | |
parent | Beautify Makefile (diff) |
Extend examples
Diffstat (limited to 'examples/fac.fusp')
-rw-r--r-- | examples/fac.fusp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/fac.fusp b/examples/fac.fusp index 38643d5..666967f 100644 --- a/examples/fac.fusp +++ b/examples/fac.fusp @@ -1,7 +1,7 @@ mul a b = code mul a b; -sub a b = code sub a b; +sub a b = code sub b a; fac 0 = 1; -fac n = mul n (fac (sub 1 n)); +fac n = mul n (fac (sub n 1)); -main = fac 5; +main = fac 4; |