summaryrefslogtreecommitdiff
path: root/demo/counter.ur
diff options
context:
space:
mode:
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