Is the following method Pure? I'd say so, as it doesn't change in anyway the current class, thus, everything we can now currenly "see" in the class, before running this method will still be exactly the same after. Am I correct?
class Set {
...
public ISet<T> UnionWith(ISet<T> set) {
ISet<T> unionSet = ...
foreach (Element element in this) {
unionSet.Add(element);
}
foreach (Element element in set) {
unionSet.Add(element);
}
return unionSet;
}
}