progs/fun-tests/fact.fun
changeset 790 31a9f89776a3
parent 742 b5b5583a3a08
--- a/progs/fun-tests/fact.fun	Sun Oct 25 01:25:01 2020 +0000
+++ b/progs/fun-tests/fact.fun	Mon Oct 26 10:24:59 2020 +0000
@@ -1,9 +1,5 @@
-// a simple factorial program
-// (including a tail recursive version)
-
-
 def fact(n) =
-  if n == 0 then 1 else n * fact(n - 1);
+  (if n == 0 then 1 else n * fact(n - 1));
 
 def facT(n, acc) =
   if n == 0 then acc else facT(n - 1, n * acc);
@@ -15,3 +11,5 @@
 
 write(facTi(6))
 
+// a simple factorial program
+// (including a tail recursive version)