On 10 March 2010 02:19, K. wrote:
> How should I compare two persistent lists ?
Is it acceptable for you to use '='
user=> (= '(1 2) '(3 4))
false
user=> (= '(1 2) '(1 2))
true
or do you really really need the +1 0 -1 behavior?
Is there any problem with ISeq requiring compareTo? In principal I
My recollection is that when I posted this question several months ago,
Rich's response was that there was no particular reason that PersistentLists
don't implement Comparable, other than that it hadn't been done yet. So I
assume a patch is welcome on this, but no one has stepped forward to do it
Hello,
It seems it's not possible to use the clojure.core/compare function
with persitent lists :
(compare '(1 2) '(3 4))
gives the following error "clojure.lang.PersistentList cannot be cast
to java.lang.Comparable"
Why don't PersistentLists implement Comparable?
It works without problems for