swapIORef :: IORef a -> a -> IO a
swapIORef r a = atomicModifyIORef' r $ \b -> (a, b)
swapIORef :: IORef a -> a -> IO a
swapIORef r a = atomicModifyIORef' r $ \b -> (a, b)
swapIORef r a = atomicModifyIORef' r $ \b -> (a, b)