---
title: nextPartialResult
framework: combine
role: symbol
role_heading: Instance Property
path: combine/publishers/tryreduce/nextpartialresult
---

# nextPartialResult

An error-throwing closure that takes the previously-accumulated value and the next element from the upstream to produce a new value.

## Declaration

```swift
let nextPartialResult: (Output, Upstream.Output) throws -> Output
```

## Discussion

Discussion If this closure throws an error, the publisher fails and passes the error to its subscriber.

## See Also

### Inspecting publisher properties

- [upstream](combine/publishers/tryreduce/upstream.md)
- [initial](combine/publishers/tryreduce/initial.md)
