Skip to content

Instantly share code, notes, and snippets.

@AeroNotix
Created September 23, 2014 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AeroNotix/dfbe806788a6d460b735 to your computer and use it in GitHub Desktop.
Save AeroNotix/dfbe806788a6d460b735 to your computer and use it in GitHub Desktop.
(defun make-id-flipper ()
(let ((state nil)
(id nil))
(lambda (client)
(if state
(return-stream-id client id)
(setf id (next-stream-id client)))
(setf state (not state)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment