diff options
Diffstat (limited to 'tests/list.ur')
-rw-r--r-- | tests/list.ur | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/list.ur b/tests/list.ur index 815c0075..480bdd3e 100644 --- a/tests/list.ur +++ b/tests/list.ur @@ -8,10 +8,15 @@ fun delist (ls : list string) : xbody = Nil => <xml>Nil</xml> | Cons (h, t) => <xml>{[h]} :: {delist t}</xml> +fun callback ls = return <xml><body> + {delist ls} +</body></xml> + fun main () = return <xml><body> {[isNil (Nil : list bool)]}, {[isNil (Cons (1, Nil))]}, {[isNil (Cons ("A", Cons ("B", Nil)))]} <p>{delist (Cons ("X", Cons ("Y", Cons ("Z", Nil))))}</p> + <a link={callback (Cons ("A", Cons ("B", Nil)))}>Go!</a> </body></xml> |