Instance Method

prefix(_:)

Republishes elements up to the specified maximum count.

Declaration

func prefix(_ maxLength: Int) -> Publishers.Output<Publishers.Concatenate<Prefix, Suffix>>

Parameters

maxLength

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