Can someone help me get un-stuck with a problem of using class in a case?

This returns true, as I expect:
(= (type "x") java.lang.String)

This returns an error, and I'd hoped it would print STRING:
(case (type "x")
 class java.lang.String (println "STRING")
 class java.lang.Long (println "NUM"))

Because the error said "No matching clause: class java.lang.String", I 
thought maybe this would be better, but if gave the same error:
(case (type "x")
 class java.lang.String (println "STRING")
 class java.lang.Long (println "NUM"))

Is in not possible to match on class in a case?

Tnx.

-- 
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/d/optout.

Reply via email to