toggle method
Removes the element, if it exists in the set. Otherwise, adds it to the set.
Implementation
ISet<T> toggle(T item) => contains(item) ? remove(item) : add(item);
Removes the element, if it exists in the set. Otherwise, adds it to the set.
ISet<T> toggle(T item) => contains(item) ? remove(item) : add(item);