adam@1463: fun doSubmit r = adam@1463: return Done {[readError r.Amount1 * readError r.Amount2 * 2.0]} adam@1463: adam@1463: fun main () = adam@1463: amount1S <- source "1"; adam@1463: amount2S <- source "1"; adam@1463: return adam@1463:
adam@1463: adam@1463: adam@1463: adam@1463: adam@1463:
Amount1:
Amount2:
Total:
adam@1463: adam@1463: adam@1463: adam@1463:
adam@1463: adam@1463: and showTotal amount1S amount2S = adam@1463: a1 <- signal amount1S; adam@1463: a2 <- signal amount2S; adam@1463: return (case ((read a1), (read a2)) of adam@1463: (None, _) => adam@1463: | (_, None) => adam@1463: | (Some a, Some b) => {[a * b * 2.0]})