view demo/counter.ur @ 918:6a77c3e33908

Use cdata for shorter Monad map
author Adam Chlipala <adamc@hcoop.net>
date Tue, 08 Sep 2009 11:02:53 -0400
parents 679b2fbbd4d0
children 4359e185d3af
line wrap: on
line source
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