fun compute(count, total) server { if (count < total) { showProgress(count, total); compute(count+1, total) } else "done counting to " ^^ intToString(total) } fun showProgress(count, total) client { var percent = 100.0 *. intToFloat(count) /. intToFloat(total); replaceNode(
|
, getNodeById("bar") ) } fun showAnswer(answer) client { replaceNode(
{stringToXml(answer)}
, getNodeById("bar") ) } fun main() { page
} main()