Extracts a current value of the IORef and returns it inside the IO monad.
IO<T> readIORef<T>(IORef<T> ref) => ref.read();