Instance Method


Republishes elements up to the specified maximum count.


func prefix(_ maxLength: Int) -> Publishers.Output<Publishers.Share<Upstream>>



The maximum number of elements to republish.

Return Value

A publisher that publishes up to the specified number of elements before completing.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software