listSubtract<T> function
Subtract elements one at a time
Implementation
List<T> listSubtract<T>(Iterable<T> original, Iterable<T> sublist) {
List<T> result = List.from(original);
for (T v in sublist) {
for (int i = 0; i < List.from(result).length; i++) {
if (deepEquals(v, result[i])) {
result.removeAt(i);
break;
}
}
}
return result;
}