Generic Instance Method


Publishes elements specified by their range in the sequence of published elements.


func output<R>(in range: R) -> Publishers.Output<Publishers.Share<Upstream>> where R : RangeExpression, R.Bound == Int



A range that indicates which elements to publish.

Return Value

A publisher that publishes elements specified by a range.


After all elements are published, the publisher finishes normally. If the publisher completes normally or with an error before producing all the elements in the range, it doesn’t publish the remaining elements.

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