From dae861a6fb8608680ae324ce33f32b4516cd94cb 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 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/dlist2.ur (limited to 'tests/dlist2.ur') 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))} +
+ +