I hereby claim:
- I am aqua-ye on github.
- I am yefrederic (https://keybase.io/yefrederic) on keybase.
- I have a public key ASAGJHXzEy3l3BE-961mqVbq5AfWS0hCyk1UPb-VM0gj8Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
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> | |
} |
function get_form_data() { | |
function decode(s) { String.replace("+", " ", Uri.decode_string(s)) } | |
match (HttpRequest.get_body()) { | |
case {none}: StringMap.empty | |
case {some:body}: | |
match (Parser.try_parse(UriParser.query_parser, body)) { | |
case {none}: StringMap.empty | |
case {some:list}: | |
List.fold(function((a, b), acc) { | |
StringMap.add(decode(a), decode(b), acc) |
import stdlib.themes.bootstrap.v1.4.0 | |
import stdlib.widgets.bootstrap | |
function start() { | |
my_button = WBootstrap.Button.make( | |
{button:<>Hello</>, callback:ignore}, [{primary}] | |
) | |
<h1>Hello</h1> <+> | |
my_button | |
} |