(seq? ...) tests for whether or not the argument is a sequence, i.e. an
instance of ISeq.

(seq ...) works on things that are "seq-able", basically any kind of
collection (instances of IPersistantCollection, instances of
java.util.Collection, Strings, Arrays, etc.), not solely instances of ISeq.
If you look at their docs, they all say they accept a collection, not a
sequence.

So, the String "abc" is seq-able, but it is not a sequence itself.

HTH,

- J.

On Thu, Oct 2, 2008 at 2:46 PM, Fogus <[EMAIL PROTECTED]> wrote:

>
> OK.  So we can do:
> (map (fn [x] x) "abc")
> (first "abc")
> (rest "abc")
> (filter (fn [x] (if (= x \b) false true)) "abc")
> (seq "abc")
> etc...
>
> So why is (seq? "abc") false?
>
> -m
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
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