Ah...so I looked into the RT code a bit more and you're right. If we
passed in a Java array or a Java String then it would need to be
converted to a Seqable class first then we could have a seq() method
to call.
Thanks,
Timothy
On Thu, Sep 2, 2010 at 9:43 AM, Armando Blancas
wrote:
> Probably s
Probably so the list can be compared to anything and thus o may not
implement Seqable, like:
user=> (.equals '() nil)
false
On Sep 1, 4:14 pm, Timothy Baldridge wrote:
> While examining the Clojure source I came across this line in the
> EmptyList class:
>
> public boolean equals(Object o) {
While examining the Clojure source I came across this line in the
EmptyList class:
public boolean equals(Object o) {
return (o instanceof Sequential || o instanceof List) &&
RT.seq(o) == null;
}
What's up with the RT.seq(o) == null? Why don't we do this instead:
public boolea