Module Ref.And_value

type t =
  1. | T : 'a ref * 'a -> t
val set : t -> unit

set (T (r, x)) is equivalent to r := x.

val sets : t list -> unit

sets ts = List.iter ts ~f:set

val snapshot : t -> t

snapshot (T (r, _)) returns T (r, !r).