Writes the given value to the IORef and returns a Unit inside the IO monad.
IO<Unit> writeIORef<T>(T value, IORef<T> ref) => ref.write(value);