Publishes only elements that don’t match the previous element, as evaluated by a provided error-throwing closure.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
A closure to evaluate whether two elements are equivalent, for purposes of filtering. Return
truefrom this closure to indicate that the second element is a duplicate of the first. If this closure throws an error, the publisher terminates with the thrown error.
A publisher that consumes — rather than publishes — duplicate elements.