add method

S<T> add(
  1. T item
)

Returns a new set containing the current set plus the given item. However, if the given item already exists in the set, it will return the current set (same instance).

Implementation

S<T> add(T item) => contains(item) ? this : SAdd(this, item);