On Wednesday, August 10, 2011 4:15:48 PM UTC-4, Alf wrote:
>
> Should this not be a seq?


That depends on how you interpret the plural ("immediate superclass and 
direct interfaces") in its docstring.

user> (clojure-version)
"1.2.1"
user> (use 'clojure.contrib.core 'clojure.pprint)
nil
user> (pprint (map (fn [p?]
                     (cons (:name (meta p?))
                           (map (juxt identity p?)
                                [[1]
                                 (map identity [1])
                                 (bases java.util.List)])))
                   [#'seq? #'sequential? #'seqable?]))
((seq? [[1] false] [(1) true] [[java.util.Collection] false])
 (sequential? [[1] true] [(1) true] [[java.util.Collection] false])
 (seqable? [[1] true] [(1) true] [[java.util.Collection] true]))

I personally favor seqable? as the test for plural return values.  
sequential? almost qualifies, but excludes sets.  seq? fails on account of 
rejecting even vectors, but you may feel differently.

-- 
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

Reply via email to