We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93291a4 commit e0f2ea0Copy full SHA for e0f2ea0
docs/docs/reference/contextual/given-clauses.md
@@ -13,7 +13,7 @@ For example, with the [given instances](./delegates.md) defined previously,
13
a maximum function that works for any arguments for which an ordering exists can be defined as follows:
14
```scala
15
def max[T](x: T, y: T) given (ord: Ord[T]): T =
16
- if (ord.compare(x, y) < 1) y else x
+ if (ord.compare(x, y) < 0) y else x
17
```
18
Here, `ord` is an _implicit parameter_ introduced with a `given` clause.
19
The `max` method can be applied as follows:
0 commit comments