Generic Instance Method

compactMap(_:)

Calls a closure with each received element and publishes any returned optional that has a value.

Declaration

func compactMap<T>(_ transform: @escaping ((A.Output, B.Output, C.Output)) -> T?) -> Publishers.CompactMap<Publishers.Zip3<A, B, C>, T>

Parameters

transform

A closure that receives a value and returns an optional value.

Return Value

A publisher that republishes all non-nil results of calling the transform closure.