fun firstButton(plus,times) { if(plus) {(+)} else if(times) {(*)} else {error("unknown button")} } var f = formlet <#> {inputInt -> l} {inputInt -> r}
{submitButton("+") -> plus} {submitButton("*") -> times} yields (action=firstButton(plus,times), l=l, r=r); fun run ((action=action, l=l, r=r)) { page {# binary infix variables are currently broken in file modules # intToXml(l `action` r) intToXml(action(l, r))} } fun main() { page {f => run} } main()