Contents

prefix(untilOutputFrom:)

Republishes elements until another publisher emits an element.

Declaration

func prefix<P>(untilOutputFrom publisher: P) -> Publishers.PrefixUntilOutput<Self, P> where P : Publisher

Parameters

  • publisher:

    A second publisher.

Return Value

A publisher that republishes elements until the second publisher publishes an element.

Discussion

After the second publisher publishes an element, the publisher returned by this method finishes.

See Also

Applying sequence operations to elements