Main> :t modify ((+1) :: Int -> Int) modify (...) :: (MonadState Int a) => a ()This says that modify (+1) acts over any Monad that is a member of the MonadState class, with an Int state.
>>> ref <- newIORef 42 >>> modifyIORef ref (\a -> a + 6) >>> readIORef ref 48
>>> ref <- newIORef 42 >>> modifyIORef' ref (\a -> a + 3) >>> readIORef ref 45
>>> ref <- newIORef 42 >>> atomicModifyIORef ref (\a -> (a, a + 3)) 45 >>> readIORef ref 42
>>> ref <- newIORef 42 >>> atomicModifyIORef' ref (\a -> (a, a + 3)) 45 >>> readIORef ref 42
>>> ref <- newIORef 42 >>> atomicModifyIORef'_ ref (`div` 2) >>> readIORef ref 21
>>> ref <- newIORef 42 >>> atomicModifyIORef_ ref (`div` 2) >>> readIORef ref 21