module Ref:sig
..end
swap t1 t2
swaps the values in t1
and t2
.type'a
t ='a Pervasives.ref
= {
|
mutable contents : |
include Binable.S1
include Sexpable.S1
include Container.S1
val create : 'a -> 'a t
val (!) : 'a t -> 'a
val (:=) : 'a t -> 'a -> unit
val swap : 'a t -> 'a t -> unit
swap t1 t2
swaps the values in t1
and t2
.val replace : 'a t -> ('a -> 'a) -> unit
replace t f
is t := f !t