Instance Method

removeDuplicates(by:)

Publishes only elements that don’t match the previous element, as evaluated by a provided closure.

Declaration

func removeDuplicates(by predicate: @escaping ((A.Output, B.Output, C.Output, D.Output), (A.Output, B.Output, C.Output, D.Output)) -> Bool) -> Publishers.RemoveDuplicates<Publishers.Zip4<A, B, C, D>>

Parameters

predicate

A closure to evaluate whether two elements are equivalent, for purposes of filtering. Return true from this closure to indicate that the second element is a duplicate of the first.

Return Value

A publisher that consumes — rather than publishes — duplicate elements.