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.