Applies an error-throwing closure that accumulates each element of a stream and publishes a final result upon completion.
- iOS 13.0+Beta
- macOS 10.15+Beta
- Mac Catalyst 13.0+Beta
- tvOS 13.0+Beta
- watchOS 6.0+Beta
- Xcode 11.0+Beta
The value the closure receives the first time it is called.
An error-throwing closure that takes the previously-accumulated value and the next element from the upstream publisher to produce a new value.
A publisher that applies the closure to all received elements and produces an accumulated value when the upstream publisher finishes.
If the closure throws an error, the publisher fails, passing the error to its subscriber.