---
title: "tryRemoveDuplicates(by:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/result/publisher-swift.struct/tryremoveduplicates(by:)"
---

# tryRemoveDuplicates(by:)

## Declaration

```swift
func tryRemoveDuplicates(by predicate: (Result<Success, Failure>.Publisher.Output, Result<Success, Failure>.Publisher.Output) throws -> Bool) -> Result<Result<Success, Failure>.Publisher.Output, any Error>.Publisher
```
