On Thu, Jul 7, 2011 at 5:14 PM, Ken Wesson <[email protected]> wrote:
> (defn array? [x] (and x (contains? (set (.getName (.getClass x))) \[))) > > (defn seqable? [x] > (or > (coll? x) > (nil? x) > (instance? java.util.Collection x) > (instance? java.util.Map x) > (instance? java.util.Set x) > (string? x) > (array? x))) > > It does do a bit of a hack to test for arrays and it breaks if seq is > extended in the future to work with anything it currently won't > accept. A better extensible way to do this: http://dosync.posterous.com/51626638 David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
