Skip to content

Commit e3c3e08

Browse files
authored
Merge pull request scala#6654 from bishabosha/fix-docs-delegates
Fix syntax in docs
2 parents 5e4be2b + a868ecc commit e3c3e08

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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

docs/docs/reference/contextual/typeclasses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ delegate ListMonad for Monad[List] {
5555
List(x)
5656
}
5757

58-
delegate ReaderMonad[Ctx] for Monad[[X] => Ctx => X] {
58+
delegate ReaderMonad[Ctx] for Monad[[X] =>> Ctx => X] {
5959
def (r: Ctx => A) flatMap [A, B] (f: A => Ctx => B): Ctx => B =
6060
ctx => f(r(ctx))(ctx)
6161
def pure[A](x: A): Ctx => A =

0 commit comments

Comments
 (0)