old.mlw 188 Bytes
Newer Older
1 2 3 4


module T

5 6
  use int.Int
  use module ref.Ref
7 8 9 10 11 12 13 14 15 16 17 18 19

  val x : ref int

  val f () : { } unit writes x { !x = !(old x) + 1 }

  let t () =
     x := 3;
     f ();
     assert { !x = 5 }


end