pkg/types/set.go
func (us *unsafeSet) Sub(other Set) Set {
	oValues := other.Values()
	result := us.Copy().(*unsafeSet)

	for _, val := range oValues {
		if _, ok := result.d[val]; !ok {
			continue
		}
		delete(result.d, val)
	}

	return result
}
func (us *unsafeSet) Sub(other Set) Set {
	oValues := other.Values()
	result := us.Copy().(*unsafeSet)

	for _, val := range oValues {
		if _, ok := result.d[val]; !ok {
			continue
		}
		delete(result.d, val)
	}

	return result
}
func ( us * unsafeSet ) Sub ( other Set ) Set { oValues := other . Values ( ) result := us . Copy ( ) . ( * unsafeSet ) for _ , val := range oValues { if _ , ok := result . d [ val ] ; ! ok { continue } delete ( result . d , val ) } return result }
// Sub removes all elements in other from the set
Sub removes all elements in other from the set