What\'s the best way to detect whether an object is a Java primitive array in Clojure?
The reason I need this is to do some special handling for primitive arrays, which
(defn primitive-array? [o] (let [c (class o)] (and (.isArray c) (.. c getComponentType isPrimitive))))
For particular cases, you could use something like the following:
(defn long-array? [o] (let [c (class o)] (and (.isArray c) (identical? (.getComponentType c) Long/TYPE))))