---
title: "init(_:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/range/init(_:)-79g1a"
---

# init(_:)

Creates an instance equivalent to the given ClosedRange.

## Declaration

```swift
init(_ other: ClosedRange<Bound>)
```

## Parameters

- `other`: A closed range to convert to a Range instance.

## Discussion

Discussion An equivalent range must be representable as an instance of Range. For example, passing a closed range with an upper bound of Int.max triggers a runtime error, because the resulting half-open range would require an upper bound of Int.max + 1, which is not representable as an Int.
