adamc@419: structure IR = RefFun.Make(struct
adamc@643: type data = int
adamc@419: end)
adamc@419:
adamc@419: structure SR = RefFun.Make(struct
adamc@643: type data = string
adamc@419: end)
adamc@419:
adamc@732: fun mutate () =
adamc@419: ir <- IR.new 3;
adamc@419: ir' <- IR.new 7;
adamc@419: sr <- SR.new "hi";
adamc@419:
adamc@434: IR.write ir' 10;
adamc@419:
adamc@419: iv <- IR.read ir;
adamc@419: iv' <- IR.read ir';
adamc@419: sv <- SR.read sr;
adamc@419:
adamc@434: IR.delete ir;
adamc@434: IR.delete ir';
adamc@434: SR.delete sr;
adamc@419:
adamc@419: return
adamc@419: {[iv]}, {[iv']}, {[sv]}
adamc@419:
adamc@732:
adamc@732: fun main () = return
adamc@732:
adamc@732: