Rea.Mut
Mutable ref cells for asynchronous programming.
Operations on mutable ref cells are atomic such that when an update of a ref cell is in progress other operations on the ref cell will suspend.
val create : 'v -> 'v t
create value
creates a new mutable ref cell with given value
.
read mut
effect returns the current value of the mutable ref cell.
val mutate :
'v op'1 ->
'v t ->
('R, 'e, unit, < ('R, 'D) pointed' ; ('R, 'D) suspend'.. > as 'D) er
mutate fn mut
effect updates the mutable ref cell with the given synchronous function.
val modify :
('v -> 'v * 'a) ->
'v t ->
('R, 'e, 'a, < ('R, 'D) pointed' ; ('R, 'D) suspend'.. > as 'D) er
modify fn mut
effect updates the mutable ref cell with the given synchronous function.