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

# formIntersection(_:)

Removes the contents of this range set that aren’t also in the given range set.

## Declaration

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

## Parameters

- `other`: A range set to intersect with.
