setEquals<T> function
Returns true if all the elemnts in iterable1 are contained in iterable2. Assumes there are no dupes in either iterable.
Implementation
bool setEquals<T>(Iterable<T>? it1, Iterable<T>? it2) {
if (it1 == null || it2 == null) {
return false;
}
if (it1.length != it2.length) {
return false;
}
for (final a in it1) {
if (!it2.contains(a)) {
return false;
}
}
return true;
}