From: Claudio Sacerdoti Coen Date: Thu, 21 Feb 2008 19:03:09 +0000 (+0000) Subject: A new very simple example for recursive functions. Still bugged, but getting X-Git-Tag: make_still_working~5582 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=bc135dc59cac6ddd2b18d62bf45371133b80aab3;p=helm.git A new very simple example for recursive functions. Still bugged, but getting better. --- diff --git a/helm/software/components/ng_kernel/test.ma b/helm/software/components/ng_kernel/test.ma index 95c919854..ff017315c 100644 --- a/helm/software/components/ng_kernel/test.ma +++ b/helm/software/components/ng_kernel/test.ma @@ -14,6 +14,7 @@ include "nat/plus.ma". +(* let rec f n := match n with [ O => O @@ -28,4 +29,16 @@ let rec f n := in h q] in - g m]. \ No newline at end of file + g m]. +*) + +let rec f n := + match n with + [ O => O + | S m => g m + ] +and g m := + match m with + [ O => O + | S n => f n + ]. \ No newline at end of file