-- | applies the given function to the state in the mutable state reference given (and then applies `write_prep`)
-- strict superset of :: Participant_State_Var -> (Participant_State -> Participant_State) -> IO ()
modify :: (Hetcons_State a) => (MVar a) -> (a -> a) -> IO ()
modify s f = modifyMVar_ s $ return . write_prep . f
modify :: (Hetcons_State a) => (MVar a) -> (a -> a) -> IO ()
modify s f = modifyMVar_ s $ return . write_prep . f
modify s f = modifyMVar_ s $ return . write_prep . f