1structure Sref :> Sref = 2struct 3 4type 'a t = 'a ref 5 6fun value s = !s 7fun update s f = (s := f (!s)) 8fun new v = ref v 9 10end 11