It looks like regular expressions are the only type with built-in
syntax that don't have a predicate function.  How about:

(def
 ^{:arglists '([x])
   :doc "Return true if x is a regular expression
(java.util.regex.Pattern)"
   :added "1.3"}
 re? (fn re? [x] (instance? java.util.regex.Pattern x)))

Or maybe call it "regexp?" if "re?" isn't clear enough...

-Jeff

-- 
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

Reply via email to