This commit is contained in:
MathMan05
2025-10-29 15:41:45 -05:00
parent 2d0591aba0
commit a8b8b8d518
+1 -1
View File
@@ -31,7 +31,7 @@ Set.prototype.symmetricDifference ||= function <T>(set: Set<T>) {
return newSet;
};
Set.prototype.isDisjointFrom ||= function <T>(set: Set<T>) {
return this.symmetricDifference(set).size === 0;
return this.intersection(set).size === 0;
};
Set.prototype.union ||= function <T>(set: Set<T>) {
return new Set([...this, ...set]);