···3333 maps.Copy(result, other)
3434 return result
3535}
3636+3737+// Intersection returns a new set containing elements common to s and other.
3838+func (s Set[T]) Intersection(other Set[T]) Set[T] {
3939+ result := New[T]()
4040+ for k := range s {
4141+ if _, ok := other[k]; ok {
4242+ result.Add(k)
4343+ }
4444+ }
4545+ return result
4646+}