---
title: "insert(contentsOf:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/rangeset/insert(contentsof:)"
---

# insert(contentsOf:)

Inserts the given range into the range set.

## Declaration

```swift
mutating func insert(contentsOf range: Range<Bound>)
```

## Parameters

- `range`: The range to insert into the set.

## Discussion

Discussion note: O(n), where n is the number of ranges in the range set.
