Generic Instance Method

merge(with:_:_:_:_:)

Combines elements from this publisher with those from five other publishers, delivering an interleaved sequence of elements.

Declaration

func merge<B, C, D, E, F>(with b: B, _ c: C, _ d: D, _ e: E, _ f: F) -> Publishers.Merge6<Publishers.Share<Upstream>, B, C, D, E, F> where B : Publisher, C : Publisher, D : Publisher, E : Publisher, F : Publisher, Self.Failure == B.Failure, Self.Output == B.Output, B.Failure == C.Failure, B.Output == C.Output, C.Failure == D.Failure, C.Output == D.Output, D.Failure == E.Failure, D.Output == E.Output, E.Failure == F.Failure, E.Output == F.Output

Parameters

b

A second publisher.

c

A third publisher.

d

A fourth publisher.

e

A fifth publisher.

f

A sixth publisher.

Return Value

A publisher that emits an event when any upstream publisher emits an event.

Discussion

The merged publisher continues to emit elements until all upstream publishers finish. If an upstream publisher produces an error, the merged publisher fails with that error.

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