| 37 | } |
| 38 | |
| 39 | public boolean equiv(Object obj){ |
| 40 | |
| 41 | if(!(obj instanceof Sequential || obj instanceof List)) |
| 42 | return false; |
| 43 | |
| 44 | if(this instanceof Counted && obj instanceof Counted && |
| 45 | ((Counted)this).count() != ((Counted)obj).count()) |
| 46 | return false; |
| 47 | |
| 48 | ISeq ms = RT.seq(obj); |
| 49 | for(ISeq s = seq(); s != null; s = s.next(), ms = ms.next()) |
| 50 | { |
| 51 | if(ms == null || !Util.equiv(s.first(), ms.first())) |
| 52 | return false; |
| 53 | } |
| 54 | return ms == null; |
| 55 | |
| 56 | } |
| 57 | |
| 58 | public boolean equals(Object obj){ |
| 59 | if(this == obj) return true; |