Generic Instance Method

zip(_:_:_:_:)

Combines elements from three other publishers and delivers a transformed output.

Declaration

func zip<P, Q, R, T>(_ publisher1: P, _ publisher2: Q, _ publisher3: R, _ transform: @escaping (Upstream.Output, P.Output, Q.Output, R.Output) -> T) -> Publishers.Map<Publishers.Zip4<Publishers.TryLastWhere<Upstream>, P, Q, R>, T> where P : Publisher, Q : Publisher, R : Publisher, Self.Failure == P.Failure, P.Failure == Q.Failure, Q.Failure == R.Failure

Parameters

publisher1

A second publisher.

publisher2

A third publisher.

publisher3

A fourth publisher.

transform

A closure that receives the most recent value from each publisher and returns a new value to publish.

Return Value

A publisher that uses the transform closure to emit new elements, produced by combining the most recent value from four upstream publishers.