listIntersect<T> function
Keep only elements from input
Implementation
List<T> listIntersect<T>(Iterable<T> original, Iterable<T> input) {
List<T> l1 = List.from(original);
List<T> l2 = List.from(input);
List<T> result = [];
for (T v in l1) {
if (deepContains(l2, v)) {
result.add(v);
}
}
return result;
}