---
title: "reduce(_:_:)"
framework: combine
role: symbol
role_heading: Instance Method
path: "combine/just/reduce(_:_:)"
---

# reduce(_:_:)

## Declaration

```swift
func reduce<T>(_ initialResult: T, _ nextPartialResult: (T, Output) -> T) -> Result<T, Just<Output>.Failure>.Publisher
```

## See Also

### Reducing elements

- [collect()](combine/just/collect().md)
- [ignoreOutput()](combine/just/ignoreoutput().md)
- [tryReduce(_:_:)](combine/just/tryreduce(_:_:).md)
