Republishes elements up to the specified maximum count.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
Framework
- Combine
Declaration
func prefix(_ maxLength: Int) -> Publishers.Output<Publishers.Zip4<A, B, C, D>>
Parameters
maxLength
The maximum number of elements to republish.
Return Value
A publisher that publishes up to the specified number of elements before completing.