---
title: "index(before:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/emptycollection/index(before:)"
---

# index(before:)

Always traps.

## Declaration

```swift
func index(before i: EmptyCollection<Element>.Index) -> EmptyCollection<Element>.Index
```

## Discussion

Discussion EmptyCollection does not have any element indices, so it is not possible to advance indices.
