equal method
Returns true
if the equality
this(i) == other(i)
holds for each index i
.
Implementation
bool equal(List<T> other) {
if (this == other) return true;
if (length != other.length) return false;
final it = iterator;
final oit = other.iterator;
while (it.moveNext() && oit.moveNext()) {
if (it.current != oit.current) {
return false;
}
}
return true;
}