Right. So, should sort work?

user=> (sort "bca")
java.lang.IncompatibleClassChangeError: Class java.lang.String does  
not implement the requested interface java.util.Collection

Stuart

> (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 clojure@googlegroups.com
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