Ref
0.40.0
Definitions
def
get
[ar]
(
rf :
Ref[a, r]
)
: a
\ r
Returns the element referenced by rf
.
def
new
[ra]
(
rc :
Region[r]
x :
a
)
: Ref[a, r]
\ r
Returns a new reference to x
in the region rc
.
def
put
[ar]
(
x :
a
rf :
Ref[a, r]
)
: Unit
\ r
Updates rf
to reference x
.
def
transform
[aefr]
(
f :
a -> a \ ef
rf :
Ref[a, r]
)
: Unit
\ r + ef
Updates rf
to reference f
applied to the value referenced by rf
.
I.e. if rf
references x
then rf
is updated to reference f(x)
.