---
title: AsyncCompactMapSequence
framework: swift
role: symbol
role_heading: Structure
path: swift/asynccompactmapsequence
---

# AsyncCompactMapSequence

An asynchronous sequence that maps a given closure over the asynchronous sequence’s elements, omitting results that don’t return a value.

## Declaration

```swift
struct AsyncCompactMapSequence<Base, ElementOfResult> where Base : AsyncSequence
```

## Topics

### Structures

- [AsyncCompactMapSequence.Iterator](swift/asynccompactmapsequence/iterator.md)

### Type Aliases

- [AsyncCompactMapSequence.Failure](swift/asynccompactmapsequence/failure.md)

### Default Implementations

- [AsyncSequence Implementations](swift/asynccompactmapsequence/asyncsequence-implementations.md)

## Relationships

### Conforms To

- [AsyncSequence](swift/asyncsequence.md)
- [Copyable](swift/copyable.md)
- [Escapable](swift/escapable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Transforming a Sequence

- [map(_:)](swift/asyncsequence/map(_:)-1q1k3.md)
- [AsyncMapSequence](swift/asyncmapsequence.md)
- [map(_:)](swift/asyncsequence/map(_:)-70wgb.md)
- [AsyncThrowingMapSequence](swift/asyncthrowingmapsequence.md)
- [compactMap(_:)](swift/asyncsequence/compactmap(_:)-gfdq.md)
- [compactMap(_:)](swift/asyncsequence/compactmap(_:)-1f8zn.md)
- [AsyncThrowingCompactMapSequence](swift/asyncthrowingcompactmapsequence.md)
- [AsyncFlatMapSequence](swift/asyncflatmapsequence.md)
- [AsyncThrowingFlatMapSequence](swift/asyncthrowingflatmapsequence.md)
- [reduce(_:_:)](swift/asyncsequence/reduce(_:_:).md)
- [reduce(into:_:)](swift/asyncsequence/reduce(into:_:).md)
