aboutsummaryrefslogtreecommitdiff
path: root/examples/fac.fusp
diff options
context:
space:
mode:
authorCamil Staps2018-04-03 20:06:13 +0200
committerCamil Staps2018-04-03 20:06:13 +0200
commitb5917471efab37e60949b380a24ecc35e2946203 (patch)
treee1359698e10bad08ac2c32e625d062ba8773b83f /examples/fac.fusp
parentBeautify Makefile (diff)
Extend examples
Diffstat (limited to 'examples/fac.fusp')
-rw-r--r--examples/fac.fusp6
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;