Skip to content

Commit a868ecc

Browse files
author
James Thompson
committed
fixes use of method-style given application
1 parent 4ac4185 commit a868ecc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/reference/contextual/inferable-params.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def max[T](x: T, y: T) given (ord: Ord[T]): T =
1818
Here, `ord` is an _implicit parameter_ introduced with a `given` clause.
1919
The `max` method can be applied as follows:
2020
```scala
21-
max(2, 3).given(IntOrd)
21+
max(2, 3) given IntOrd
2222
```
2323
The `given IntOrd` part passes `IntOrd` as an argument for the `ord` parameter. But the point of
2424
implicit parameters is that this argument can also be left out (and it usually is). So the following

0 commit comments

Comments
 (0)