Skip to content

Instantly share code, notes, and snippets.

@pebblexe
Created March 28, 2017 18:05
Show Gist options
  • Save pebblexe/afc2a76b0f7e903b419926f973a8a728 to your computer and use it in GitHub Desktop.
Save pebblexe/afc2a76b0f7e903b419926f973a8a728 to your computer and use it in GitHub Desktop.
(defvar msg-type '(:hello 1
:welcome 2
:abort 3
:challenge 4
:authenticate 5
:goodbye 6
:error 8
:publish 16
:published 17
:subscribe 32
:subscribed 33
:unsubscribe 34
:unsubscribed 35
:event 36
:call 48
:cancel 49
:result 50
:register 64
:registered 65
:unregister 66
:unregistered 67
:invocation 68
:interrupt 69
:yield 70))
(optima:match message-type (33 (format t "do something?"))) ; works
(optima:match message-type ((getf msg-type :subscribed) (format t "do something?"))) ; doesn't work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment