Skip to content

Instantly share code, notes, and snippets.

@danking
Created November 14, 2010 05:28
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 danking/675935 to your computer and use it in GitHub Desktop.
Save danking/675935 to your computer and use it in GitHub Desktop.
(define-struct foo (a))
(define-struct bar (a b c))
;; ---
;; better syntax could probably be thought of...
(struct-dispatch my-var
((foo (a) (do-something a))
((bar (a b c) (do-something-else a b c))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment