// You should not write to Val when using RxRef public static RxRef <A> toRxRef <A>(this PrefVal <A> val) { var rx = new RxRef <A>(val.value); rx.subscribe(v => val.value = v); return(rx); }
// You should not write to Val when using RxRef public RxRef <A> toRxRef() { var rx = new RxRef <A>(read); rx.subscribe(v => write(v)); return(rx); }