From ae83d3e44959b43c167ba83736055bf94ace3113 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 17 Sep 2009 16:35:11 -0400 Subject: Basic tail recursion introduction seems to be working --- tests/tail.ur | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/tail.ur (limited to 'tests/tail.ur') diff --git a/tests/tail.ur b/tests/tail.ur new file mode 100644 index 00000000..259b5f34 --- /dev/null +++ b/tests/tail.ur @@ -0,0 +1,15 @@ +fun one () = return 1 + +fun addEm n = + if n = 0 then + return 0 + else + n1 <- rpc (one ()); + n2 <- addEm (n - 1); + return (n1 + n2) + +fun main () = + s <- source 0; + return + + -- cgit v1.2.3