---
title: collect()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/result/publisher-swift.struct/collect()
---

# collect()

## Declaration

```swift
func collect() -> Result<[Result<Success, Failure>.Publisher.Output], Failure>.Publisher
```
