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

# intersection(_:)

Returns a new range set containing the contents of both this set and the given set.

## Declaration

```swift
func intersection(_ other: RangeSet<Bound>) -> RangeSet<Bound>
```

## Parameters

- `other`: The range set to merge with this one.

## Return Value

Return Value A new range set.
