         return self.subtracting(Range(ranges))
     }
     public func intersection(_ ranges: CountableClosedRange<Bound>) -> RangeSet {
-        return self.subtracting(Range(ranges))
-    }
-}
+        return self.intersection(Range(ranges))
+    }
+    public func symmetricDifference(_ ranges: CountableClosedRange<Bound>) -> RangeSet {
+        return self.symmetricDifference(Range(ranges))
+    }
+}

        }
        return RangeSet(ranges: collect.sorted { $0.lowerBound < $1.lowerBound })
    }
}

extension RangeSet {

        return ranges.ranges.reduce(self) { $0.subtracting($1) }
    }
    public func intersection(_ ranges: RangeSet) -> RangeSet {
        return ranges.ranges.reduce(RangeSet()) { $0.union(self.intersection($1)) }
    }
    public func symmetricDifference(_ ranges: RangeSet) -> RangeSet {
        return self.subtracting(ranges).union(ranges.subtracting(self))
    }
}

