<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Comparable/...(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Operator",
  "symbol" : {
    "kind" : "Operator",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:SLsE3zzzoiySNyxGx_xtFZ"
  },
  "title" : "...(_:_:)"
}
-->

# ...(_:_:)

Returns a closed range that contains both of its bounds.

```
static func ... (minimum: Self, maximum: Self) -> ClosedRange<Self>
```

## Parameters

`minimum`

The lower bound for the range.

`maximum`

The upper bound for the range.

## Discussion

Use the closed range operator (`...`) to create a closed range of any type
that conforms to the `Comparable` protocol. This example creates a
`ClosedRange<Character>` from “a” up to, and including, “z”.

```
let lowercase = "a"..."z"
print(lowercase.contains("z"))
// Prints "true"
```

> Precondition: `minimum <= maximum`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)