summaryrefslogtreecommitdiff
path: root/demo/counter.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-10-23 11:59:48 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-10-23 11:59:48 -0400
commit3b7e65be5f6e496c23df7909d50ce8e287d571d7 (patch)
tree9623809c43673edac7f48bb26d0be992f2c4377d /demo/counter.ur
parent40b25d79d51e794c734ca384083b45fb61b0a632 (diff)
Counter demo
Diffstat (limited to 'demo/counter.ur')
-rw-r--r--demo/counter.ur7
1 files changed, 7 insertions, 0 deletions
diff --git a/demo/counter.ur b/demo/counter.ur
new file mode 100644
index 00000000..b11fc936
--- /dev/null
+++ b/demo/counter.ur
@@ -0,0 +1,7 @@
+fun counter n = return <xml><body>
+ Current counter: {[n]}<br/>
+ <a link={counter (n + 1)}>Increment</a><br/>
+ <a link={counter (n - 1)}>Decrement</a>
+</body></xml>
+
+fun main () = counter 0