diff options
author | scgilardi <scgilardi@gmail.com> | 2008-11-27 19:06:26 +0000 |
---|---|---|
committer | scgilardi <scgilardi@gmail.com> | 2008-11-27 19:06:26 +0000 |
commit | 810032a81e0d9e393c6eca720a32d68c0afee5dd (patch) | |
tree | d75a605f2f291f7f506fed1c2cbbcf478b54e3e8 /src/clojure/contrib/pred.clj | |
parent | e02a316001666934f72cf1f8170c959c69371ef2 (diff) |
pred.clj: make macro? work again
Diffstat (limited to 'src/clojure/contrib/pred.clj')
-rw-r--r-- | src/clojure/contrib/pred.clj | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/clojure/contrib/pred.clj b/src/clojure/contrib/pred.clj index 9760ec0e..2ec76284 100644 --- a/src/clojure/contrib/pred.clj +++ b/src/clojure/contrib/pred.clj @@ -57,12 +57,12 @@ ;; function? -> fn? -(defmacro macro? - "Returns true if x is a function and the symbol of the - same name can be resolved and has its :macro metadata - set" +(defn macro? + "Returns true if x names a macro" [x] - `(and (fn? ~x) (boolean (:macro ^#'~x)))) + (and (symbol? x) + (boolean + (:macro (meta (resolve x)))))) ;; integer? ;; even? |