Mercurial > urweb
view demo/increment.ur @ 1933:8e6e3d9cea22
RAND_bytes isn't thread-safe, so wrap it with a lock
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 11 Dec 2013 18:54:42 -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>