Skip to content

Instantly share code, notes, and snippets.

@rrichardson
Created May 9, 2010 01:25
Show Gist options
  • Save rrichardson/394874 to your computer and use it in GitHub Desktop.
Save rrichardson/394874 to your computer and use it in GitHub Desktop.
getNextMsgID :: Peer -> IO Int64
getNextMsgID peer = modifyMvar (pCurrent peer) (\x -> do { let y = x + 1; return (y, y); } )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment