Skip to content

Instantly share code, notes, and snippets.

@AeroNotix
Created September 23, 2014 21:48
Show Gist options
  • Select an option

  • Save AeroNotix/dfbe806788a6d460b735 to your computer and use it in GitHub Desktop.

Select an option

Save AeroNotix/dfbe806788a6d460b735 to your computer and use it in GitHub Desktop.

Revisions

  1. AeroNotix created this gist Sep 23, 2014.
    8 changes: 8 additions & 0 deletions gistfile1.lisp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    (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)))))