Test every book test case
[tiger.ml.git] / compiler / testcases / test21.tig
diff --git a/compiler/testcases/test21.tig b/compiler/testcases/test21.tig
new file mode 100644 (file)
index 0000000..4501854
--- /dev/null
@@ -0,0 +1,13 @@
+/* error : procedure returns value  and procedure is used in arexpr */
+let
+
+/* calculate n! */
+function nfactor(n: int) =
+               if  n = 0 
+                       then 1
+                       else n * nfactor(n-1)
+
+in
+       nfactor(10)
+end
+
This page took 0.024704 seconds and 4 git commands to generate.