Skip to content

Commit e0f2ea0

Browse files
committed
Fix typo
as suggested in #7134 by @vn971
1 parent 93291a4 commit e0f2ea0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/reference/contextual/given-clauses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For example, with the [given instances](./delegates.md) defined previously,
1313
a maximum function that works for any arguments for which an ordering exists can be defined as follows:
1414
```scala
1515
def max[T](x: T, y: T) given (ord: Ord[T]): T =
16-
if (ord.compare(x, y) < 1) y else x
16+
if (ord.compare(x, y) < 0) y else x
1717
```
1818
Here, `ord` is an _implicit parameter_ introduced with a `given` clause.
1919
The `max` method can be applied as follows:

0 commit comments

Comments
 (0)