Skip to content

Instantly share code, notes, and snippets.

@jamii
Created October 6, 2012 19:05
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 jamii/3845808 to your computer and use it in GitHub Desktop.
Save jamii/3845808 to your computer and use it in GitHub Desktop.
user=> x
(quote _)
user=> (pattern x)
ExceptionInfo throw+: :strucjure.internal.matcher/match-failure strucjure.internal.matcher/fail (matcher.clj:224)
user=> (pattern '(quote _))
#strucjure.internal.matcher.Literal{:literal _}
user=> (pattern (quote _))
#strucjure.internal.matcher.Bind{:symbol _}
user=> pattern
#strucjure.internal.matcher.Match{:match-fn #<matcher$eval1491$fn__1492 strucjure.internal.matcher$eval1491$fn__1492@17ef3d12>}
user=> (def y '(quote _))
#'user/y
user=> (pattern y)
#strucjure.internal.matcher.Literal{:literal _}
user=> (list? x)
false
user=> (list? y)
true
user=> (seq? x)
true
user=> (seq? y)
true
user=> (class x)
clojure.lang.Cons
user=> ; aha...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment