operator < method
- Iterable<
T> other
Safely performs lexicographical comparison against another iterable.
Implementation
bool operator <(Iterable<T> other) {
Iterator<T> it1 = iterator;
Iterator<T> it2 = other.iterator;
while (it1.moveNext() && it2.moveNext()) {
if (it1.current < it2.current) return true;
if (it1.current > it2.current) return false;
}
return it2.moveNext();
}