diff options
-rw-r--r-- | src/boot.clj | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/boot.clj b/src/boot.clj index 8f8d7ac7..a8d0077d 100644 --- a/src/boot.clj +++ b/src/boot.clj @@ -39,13 +39,6 @@ ([comparator & args] (. clojure.lang.PersistentTreeMap (create comparator args)))) -;;;;;;;;;;;;;;;;; metadata ;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defn meta [#^clojure.lang.IObj x] - (. x (meta))) - -(defn with-meta [#^clojure.lang.IObj x m] - (. x (withMeta m))) - ;;;;;;;;;;;;;;;;;;;; @@ -62,6 +55,15 @@ (defmacro when-not [test & body] (list 'if test nil (cons 'do body))) +;;;;;;;;;;;;;;;;; metadata ;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defn meta [x] + (when (instance? clojure.lang.IObj x) + (. #^clojure.lang.IObj x (meta)))) + +(defn with-meta [#^clojure.lang.IObj x m] + (. x (withMeta m))) + + (defn #^Boolean nil? [x] (identical? x nil)) (defn #^Boolean false? [x] (identical? x false)) (defn #^Boolean true? [x] (identical? x true)) |