From 13e3b7139dcee90106332ff4fb5b3c63fcf4a892 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 +++++++++++++++ tests/tail.urp | 3 +++ tests/tail.urs | 1 + 3 files changed, 19 insertions(+) create mode 100644 tests/tail.ur create mode 100644 tests/tail.urp create mode 100644 tests/tail.urs (limited to 'tests') 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 + + diff --git a/tests/tail.urp b/tests/tail.urp new file mode 100644 index 00000000..5063c0b7 --- /dev/null +++ b/tests/tail.urp @@ -0,0 +1,3 @@ +debug + +tail diff --git a/tests/tail.urs b/tests/tail.urs new file mode 100644 index 00000000..6ac44e0b --- /dev/null +++ b/tests/tail.urs @@ -0,0 +1 @@ +val main : unit -> transaction page -- cgit v1.2.3