new :: forall a. a -> Effect (Ref a)

Create a new ref containing value 'a'


read :: forall a. Ref a -> Effect a


write :: forall a. a -> Ref a -> Effect Unit

Writes a value to the reference Note: This will block if the reference is presently locked


modify :: forall a. (a -> a) -> Ref a -> Effect a


data Ref t0

Handle to a thread-safe reference to a shared value