---
title: "formSymmetricDifference(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/rangeset/formsymmetricdifference(_:)"
---

# formSymmetricDifference(_:)

Removes the contents of this range set that are also in the given set and adds the contents of the given set that are not already in this range set.

## Declaration

```swift
mutating func formSymmetricDifference(_ other: RangeSet<Bound>)
```

## Parameters

- `other`: A range set to perform a symmetric difference against.
