I have a sequence of keywords which I want to use match on. However, :when 
has a special meaning, which means I cannot do something like:


(let [x [:ok :when :where]]
  (match [x]
    [[_ :when _]] :a0))


which gives a "clojure.lang.Compiler$CompilerException: 
java.lang.AssertionError: Assert failed: Unknown predicate in [_]" error.

How can I escape keywords to make them literal? I suppose I can do 
something like:

(let [x [:ok :when :where]
      w :when]
  (match [x]
    [[_ w _]] :a0))

but is there a better way?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to