(Object o)
| 492 | } |
| 493 | |
| 494 | public int compareTo(Object o){ |
| 495 | IPersistentVector v = (IPersistentVector) o; |
| 496 | if(count() < v.count()) |
| 497 | return -1; |
| 498 | else if(count() > v.count()) |
| 499 | return 1; |
| 500 | for(int i = 0; i < count(); i++) |
| 501 | { |
| 502 | int c = Util.compare(nth(i),v.nth(i)); |
| 503 | if(c != 0) |
| 504 | return c; |
| 505 | } |
| 506 | return 0; |
| 507 | } |
| 508 | |
| 509 | static class Seq extends ASeq implements IndexedSeq, IReduce{ |
| 510 | //todo - something more efficient |