> Here is one way:
>
>   (-> (into-array ["one" "two"]) (class) (.getComponentType))
> -> java.lang.String
> (-> (to-array ["one" "two"]) (class) (.getComponentType))
> -> java.lang.Object

The above answer seems to answer the question, "How do I determine
what type of object is inside an array?"  I interpreted the original
question to be, "How do I distinguish Arrays from other kinds of
objects?"  Here's one way to do that:

user=> (.isArray (class (into-array ["a"])))
true
user=> (.isArray (class "a"))
false

Bill Smith
Austin, TX
--~--~---------~--~----~------------~-------~--~----~
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
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