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

# tryMax(by:)

## Declaration

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