view demo/increment.ur @ 1965:126d24ef6678

Turn off GCC's fancy %n checking, because the performance cost is too high
author Adam Chlipala <adam@chlipala.net>
date Fri, 07 Feb 2014 18:34:17 -0500
parents e6bc6bbd7a32
children
line wrap: on
line source
sequence seq

fun increment () = nextval seq

fun main () =
    src <- source 0;
    return <xml><body>
      <dyn signal={n <- signal src; return <xml>{[n]}</xml>}/>
      <button value="Update" onclick={fn _ => n <- rpc (increment ()); set src n}/>
    </body></xml>