Created
September 20, 2012 10:23
-
-
Save Aqua-Ye/3755095 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
database int /counter; | |
function apply(f) { | |
/counter = Int.apply(#counter, f); | |
} | |
function page(){ | |
<h1 id=#counter>0</h1> | |
<h1><span onclick={apply(++)}>+</span> <span onclick={apply(--)}>-</span></h1> | |
} | |
Server.start(Server.http, { title: "counter", ~page }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment