---
title: "first(matchingCategory:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/sequence/first(matchingcategory:)"
---

# first(matchingCategory:)

Finds and returns the first tag matching the specified category.

## Declaration

```swift
func first<T>(matchingCategory category: CMTypedTag<T>.Category) -> CMTypedTag<T>? where T : Sendable
```

## Discussion

Discussion category: The category to match.
