@@ -63,51 +63,44 @@ infix operator ⊇ { associativity left precedence 130 }
63
63
infix operator ⊉ { associativity left precedence 130 }
64
64
65
65
/// - Returns: The relative complement of `lhs` with respect to `rhs`.
66
- public func ∖ <
67
- T, S: Sequence where S. Iterator. Element == T
68
- > ( lhs: Set < T > , rhs: S ) -> Set < T > {
66
+ public func ∖ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Set < T >
67
+ where S. Iterator. Element == T {
69
68
return lhs. subtracting ( rhs)
70
69
}
71
70
72
71
/// Assigns the relative complement between `lhs` and `rhs` to `lhs`.
73
- public func ∖= <
74
- T, S: Sequence where S. Iterator. Element == T
75
- > ( lhs: inout Set < T > , rhs: S ) {
72
+ public func ∖= < T, S: Sequence > ( lhs: inout Set < T > , rhs: S )
73
+ where S. Iterator. Element == T {
76
74
lhs. subtract ( rhs)
77
75
}
78
76
79
77
/// - Returns: The union of `lhs` and `rhs`.
80
- public func ∪ <
81
- T, S: Sequence where S. Iterator. Element == T
82
- > ( lhs: Set < T > , rhs: S ) -> Set < T > {
78
+ public func ∪ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Set < T >
79
+ where S. Iterator. Element == T {
83
80
return lhs. union ( rhs)
84
81
}
85
82
86
83
/// Assigns the union of `lhs` and `rhs` to `lhs`.
87
- public func ∪= <
88
- T, S: Sequence where S. Iterator. Element == T
89
- > ( lhs: inout Set < T > , rhs: S ) {
84
+ public func ∪= < T, S: Sequence > ( lhs: inout Set < T > , rhs: S )
85
+ where S. Iterator. Element == T {
90
86
lhs. formUnion ( rhs)
91
87
}
92
88
93
89
/// - Returns: The intersection of `lhs` and `rhs`.
94
- public func ∩ <
95
- T, S: Sequence where S. Iterator. Element == T
96
- > ( lhs: Set < T > , rhs: S ) -> Set < T > {
90
+ public func ∩ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Set < T >
91
+ where S. Iterator. Element == T {
97
92
return lhs. intersection ( rhs)
98
93
}
99
94
100
95
/// Assigns the intersection of `lhs` and `rhs` to `lhs`.
101
- public func ∩= <
102
- T, S: Sequence where S. Iterator. Element == T
103
- > ( lhs: inout Set < T > , rhs: S ) {
96
+ public func ∩= < T, S: Sequence > ( lhs: inout Set < T > , rhs: S )
97
+ where S. Iterator. Element == T {
104
98
lhs. formIntersection ( rhs)
105
99
}
106
100
107
101
/// - Returns: A set with elements in `lhs` or `rhs` but not in both.
108
- public func ⨁ <
109
- T, S: Sequence where S. Iterator. Element == T
110
- > ( lhs: Set < T > , rhs: S ) -> Set < T > {
102
+ public func ⨁ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Set < T >
103
+ where S. Iterator. Element == T {
111
104
return lhs. symmetricDifference ( rhs)
112
105
}
113
106
@@ -129,57 +122,49 @@ public func ∉ <T>(x: T, rhs: Set<T>) -> Bool {
129
122
}
130
123
131
124
/// - Returns: True if `lhs` is a strict subset of `rhs`.
132
- public func ⊂ <
133
- T, S: Sequence where S. Iterator. Element == T
134
- > ( lhs: Set < T > , rhs: S ) -> Bool {
125
+ public func ⊂ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Bool
126
+ where S. Iterator. Element == T {
135
127
return lhs. isStrictSubset ( of: rhs)
136
128
}
137
129
138
130
/// - Returns: True if `lhs` is not a strict subset of `rhs`.
139
- public func ⊄ <
140
- T, S: Sequence where S. Iterator. Element == T
141
- > ( lhs: Set < T > , rhs: S ) -> Bool {
131
+ public func ⊄ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Bool
132
+ where S. Iterator. Element == T {
142
133
return !lhs. isStrictSubset ( of: rhs)
143
134
}
144
135
145
136
/// - Returns: True if `lhs` is a subset of `rhs`.
146
- public func ⊆ <
147
- T, S: Sequence where S. Iterator. Element == T
148
- > ( lhs: Set < T > , rhs: S ) -> Bool {
137
+ public func ⊆ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Bool
138
+ where S. Iterator. Element == T {
149
139
return lhs. isSubset ( of: rhs)
150
140
}
151
141
152
142
/// - Returns: True if `lhs` is not a subset of `rhs`.
153
- public func ⊈ <
154
- T, S: Sequence where S. Iterator. Element == T
155
- > ( lhs: Set < T > , rhs: S ) -> Bool {
143
+ public func ⊈ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Bool
144
+ where S. Iterator. Element == T {
156
145
return !lhs. isSubset ( of: rhs)
157
146
}
158
147
159
148
/// - Returns: True if `lhs` is a strict superset of `rhs`.
160
- public func ⊃ <
161
- T, S: Sequence where S. Iterator. Element == T
162
- > ( lhs: Set < T > , rhs: S ) -> Bool {
149
+ public func ⊃ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Bool
150
+ where S. Iterator. Element == T {
163
151
return lhs. isStrictSuperset ( of: rhs)
164
152
}
165
153
166
154
/// - Returns: True if `lhs` is not a strict superset of `rhs`.
167
- public func ⊅ <
168
- T, S: Sequence where S. Iterator. Element == T
169
- > ( lhs: Set < T > , rhs: S ) -> Bool {
155
+ public func ⊅ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Bool
156
+ where S. Iterator. Element == T {
170
157
return !lhs. isStrictSuperset ( of: rhs)
171
158
}
172
159
173
160
/// - Returns: True if `lhs` is a superset of `rhs`.
174
- public func ⊇ <
175
- T, S: Sequence where S. Iterator. Element == T
176
- > ( lhs: Set < T > , rhs: S ) -> Bool {
161
+ public func ⊇ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Bool
162
+ where S. Iterator. Element == T {
177
163
return lhs. isSuperset ( of: rhs)
178
164
}
179
165
180
166
/// - Returns: True if `lhs` is not a superset of `rhs`.
181
- public func ⊉ <
182
- T, S: Sequence where S. Iterator. Element == T
183
- > ( lhs: Set < T > , rhs: S ) -> Bool {
167
+ public func ⊉ < T, S: Sequence > ( lhs: Set < T > , rhs: S ) -> Bool
168
+ where S. Iterator. Element == T {
184
169
return !lhs. isSuperset ( of: rhs)
185
170
}
0 commit comments