---
title: PartialRangeThrough
framework: swift
role: symbol
role_heading: Structure
path: swift/partialrangethrough
---

# PartialRangeThrough

A partial interval up to, and including, an upper bound.

## Declaration

```swift
@frozen struct PartialRangeThrough<Bound> where Bound : Comparable
```

## Overview

Overview You create PartialRangeThrough instances by using the prefix closed range operator (prefix ...). let throughFive = ...5.0 You can use a PartialRangeThrough instance to quickly check if a value is contained in a particular range of values. For example: throughFive.contains(4.0)     // true throughFive.contains(5.0)     // true throughFive.contains(6.0)     // false You can use a PartialRangeThrough instance of a collection’s indices to represent the range from the start of the collection up to, and including, the partial range’s upper bound. let numbers = [10, 20, 30, 40, 50, 60, 70] print(numbers[...3]) // Prints "[10, 20, 30, 40]"

## Topics

### Initializers

- [init(_:)](swift/partialrangethrough/init(_:).md)

### Instance Properties

- [upperBound](swift/partialrangethrough/upperbound.md)

### Default Implementations

- [Decodable Implementations](swift/partialrangethrough/decodable-implementations.md)
- [Encodable Implementations](swift/partialrangethrough/encodable-implementations.md)
- [RangeExpression Implementations](swift/partialrangethrough/rangeexpression-implementations.md)

## Relationships

### Conforms To

- [BNNSGraph.Builder.SliceIndex](accelerate/bnnsgraph/builder/sliceindex.md)
- [Copyable](swift/copyable.md)
- [CustomTestStringConvertible](testing/customteststringconvertible.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Escapable](swift/escapable.md)
- [MLShapedArrayRangeExpression](coreml/mlshapedarrayrangeexpression.md)
- [MLTensorRangeExpression](coreml/mltensorrangeexpression.md)
- [NDArray.RangeExpression](coreai/ndarray/rangeexpression.md)
- [RangeExpression](swift/rangeexpression.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Range Expressions

- [PartialRangeUpTo](swift/partialrangeupto.md)
- [PartialRangeFrom](swift/partialrangefrom.md)
- [RangeExpression](swift/rangeexpression.md)
- [UnboundedRange_](swift/unboundedrange_.md)
