Mavkit_smart_rollup_node.Reference
Abstraction module for OCaml references
Type ('perm, 'value) t
represents references containing a value of type 'value
and permissions specified by 'perm
.
val get : (_, 'a) t -> 'a
get r
returns the value held by reference r
.
val set : 'a rw -> 'a -> unit
set r v
sets reference r
to the value v
.
val map : ('a -> 'a) -> 'a rw -> unit
map r f
apply f
to the current value v
held in the reference r
.
val new_ : 'a -> (_, 'a) t
new_ v
creates a fresh reference holding value v
.