Module
Control.Monad.Eff.Ref
- Package
- purescript-refs
- Repository
- purescript/purescript-refs
This module defines an effect and actions for working with global mutable variables.
Note: The Control.Monad.ST
provides a safe alternative
to global mutable variables when mutation is restricted to a
local scope.
#modifyRef' Source
modifyRef' :: forall r b s. Ref s -> (s -> { state :: s, value :: b }) -> Eff (ref :: REF | r) b
Update the value of a mutable reference by applying a function to the current value.