modifyTVar :: TVar a -> (a -> a) -> STM ()
modifyTVar v f =
    do v' <- readTVar v
       writeTVar v $ f v'
modifyTVar :: TVar a -> (a -> a) -> STM ()
modifyTVar v f =
    do v' <- readTVar v
       writeTVar v $ f v'
modifyTVar v f =
    do v' <- readTVar v
       writeTVar v $ f v'