table t : { Ch : channel string }
fun go () =
let
fun overwrite () =
dml (DELETE FROM t WHERE TRUE);
ch <- channel;
dml (INSERT INTO t (Ch) VALUES ({[ch]}));
return ch
fun retrieve () =
oneRowE1 (SELECT (t.Ch) FROM t)
fun transmit () =
ch <- retrieve ();
send ch "Test"
fun listenOn ch =
s <- recv ch;
alert s
in
ch <- overwrite ();
return
end
fun main () = return