Skip to content

Instantly share code, notes, and snippets.

@cemerick
Last active August 29, 2015 13:55
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 cemerick/6b7bb333293fd11855d9 to your computer and use it in GitHub Desktop.
Save cemerick/6b7bb333293fd11855d9 to your computer and use it in GitHub Desktop.
capturing result of :or in core.match
user> (match/match [5] [(:or 5 6 :as x)] x)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: x in this context
user> (match/match [5] [((:or 5 6) :as x)] x)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: x in this context
user> (match/match [5] [(:or (5 :as x) (6 :as x))] x)
5
user> (match/match [5] [(:or (5 :as x) (6 :as y))] x)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: x in this context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment