Skip to content

Instantly share code, notes, and snippets.

@yayitswei
Created December 8, 2014 06:12
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 yayitswei/ce4dd59cdb5b6f9aa5be to your computer and use it in GitHub Desktop.
Save yayitswei/ce4dd59cdb5b6f9aa5be to your computer and use it in GitHub Desktop.
;; wrap-action should be called for all the defined cases, but not for the default case
(case v
1 (wrap-action (foo))
2 (wrap-action (bar))
3 (wrap-action (baz))
(qux))
@yayitswei
Copy link
Author

amalloy: (if-let [f (case v 1 foo, 2 bar, 3 baz, nil)] (wrap-action (f)) (qux))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment