modSet<T> static method
Implementation
static Set<T> modSet<T>(Set<T> initial, Iterable<T>? add, Iterable<T>? remove, bool Function(T)? where){
if(add != null || remove != null || where != null){
Set<T> copy = initial.toSet();
if(add != null){
copy.addAll(add);
}
if(remove != null){
for(T item in remove){
copy.remove(item);
}
}
if(where != null){
copy.removeWhere(where);
}
return copy;
}
return initial;
}