From 9d4b65c06d1277c74e0c6f782f0e2b93d7919da2 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 17 Jan 2009 09:55:12 -0500 Subject: dlist2 working swimmingly --- tests/dlist2.ur | 25 +++++++++++++++++++++++++ tests/dlist2.urp | 3 +++ 2 files changed, 28 insertions(+) create mode 100644 tests/dlist2.ur create mode 100644 tests/dlist2.urp (limited to 'tests') diff --git a/tests/dlist2.ur b/tests/dlist2.ur new file mode 100644 index 00000000..3d2c7105 --- /dev/null +++ b/tests/dlist2.ur @@ -0,0 +1,25 @@ +datatype dlist = Nil | Cons of string * source dlist + +fun delist dl = + case dl of + Nil => [] + | Cons (x, s) => {[x]} :: {delistSource s} + +and delistSource s = + +fun main () : transaction page = + tail0 <- source Nil; + tail <- source tail0; + tb <- source ""; + return + {delist (Cons ("ROOT", tail0))} +
+ +