On Oct 2, 2008, at 2:58 PM, Stuart Halloway wrote:

> Right. So, should sort work?
>
> user=> (sort "bca")
> java.lang.IncompatibleClassChangeError: Class java.lang.String does

> not implement the requested interface java.util.Collection


It does work and returns a sorted seq of characters. I don't know why  
you got the result you did. I think I've seen  
IncompatibleClassChangeErrors clear with a re-launch of Clojure, but I  
don't know what causes them:

user=> (sort "bca")
(\a \b \c)

On Oct 2, 2008, at 5:26 PM, Stephen C. Gilardi wrote:

> I think changing [sort and sort-by] to be consistent with the rest  
> of the sequence functions in [automatically calling seq on their  
> arguments] would be a good idea.

Looking further into this, I see that doing this would be incorrect.  
Preserving the type of the argument through to an internal call to "to- 
array" allows for an efficient, type-specific operation to put the  
contents of coll into the Java array that's used for sorting.

--Steve


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