iListSublistEquality<T> function
Implementation
bool iListSublistEquality<T>(IList<T> prev, IList<T> next) {
final prevLength = prev.length;
final nextLength = next.length;
if (prevLength == nextLength) {
return prev == next;
} else if (next.isEmpty || prevLength < nextLength) {
return false;
}
return prev.sublist(0, nextLength) == next;
}