---
title: "tryReduce(_:_:)"
framework: combine
role: symbol
role_heading: Instance Method
path: "combine/publishers/sequence/tryreduce(_:_:)"
---

# tryReduce(_:_:)

## Declaration

```swift
func tryReduce<T>(_ initialResult: T, _ nextPartialResult: @escaping (T, Publishers.Sequence<Elements, Failure>.Output) throws -> T) -> Result<T, any Error>.Publisher
```

## See Also

### Reducing elements

- [collect()](combine/publishers/sequence/collect().md)
- [ignoreOutput()](combine/publishers/sequence/ignoreoutput().md)
- [reduce(_:_:)](combine/publishers/sequence/reduce(_:_:).md)
