public OrderedSet <T> excluding(T element) { var copy = new OrderedSet <T>(this); copy.remove(element); return(copy); }
public OrderedSet <T> minus(Set <T> other) { var result = new OrderedSet <T>(this); foreach (T element in other) { result.remove(element); } return(result); }
public virtual OrderedSet <T> append(T item) { var copy = new OrderedSet <T>(this); if (this.Contains(item)) { copy.remove(item); } copy.add(item); return(copy); }