(other Set[T])
| 66 | } |
| 67 | |
| 68 | func (s Set[T]) Diff(other Set[T]) Set[T] { |
| 69 | out := make(Set[T]) |
| 70 | for k := range s { |
| 71 | if _, ok := other[k]; !ok { |
| 72 | out[k] = struct{}{} |
| 73 | } |
| 74 | } |
| 75 | return out |
| 76 | } |
| 77 | |
| 78 | // Clear removes all elements from the set. |
| 79 | // |
no outgoing calls