From 4ac41850154a1df2344b910a129cf445fdbd7c62 Mon Sep 17 00:00:00 2001 From: James Thompson Date: Mon, 10 Jun 2019 22:11:32 +0200 Subject: [PATCH 1/2] fix type lambda syntax --- docs/docs/reference/contextual/typeclasses.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/reference/contextual/typeclasses.md b/docs/docs/reference/contextual/typeclasses.md index 0275017345f4..95c1c18b15e6 100644 --- a/docs/docs/reference/contextual/typeclasses.md +++ b/docs/docs/reference/contextual/typeclasses.md @@ -55,7 +55,7 @@ delegate ListMonad for Monad[List] { List(x) } -delegate ReaderMonad[Ctx] for Monad[[X] => Ctx => X] { +delegate ReaderMonad[Ctx] for Monad[[X] =>> Ctx => X] { def (r: Ctx => A) flatMap [A, B] (f: A => Ctx => B): Ctx => B = ctx => f(r(ctx))(ctx) def pure[A](x: A): Ctx => A = From a868eccb991ccc3db0c8c414dfcd9f741e4978a6 Mon Sep 17 00:00:00 2001 From: James Thompson Date: Mon, 10 Jun 2019 22:13:15 +0200 Subject: [PATCH 2/2] fixes use of method-style given application --- docs/docs/reference/contextual/inferable-params.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/reference/contextual/inferable-params.md b/docs/docs/reference/contextual/inferable-params.md index 212f487fbdd2..43c4e7ffb500 100644 --- a/docs/docs/reference/contextual/inferable-params.md +++ b/docs/docs/reference/contextual/inferable-params.md @@ -18,7 +18,7 @@ def max[T](x: T, y: T) given (ord: Ord[T]): T = Here, `ord` is an _implicit parameter_ introduced with a `given` clause. The `max` method can be applied as follows: ```scala -max(2, 3).given(IntOrd) +max(2, 3) given IntOrd ``` The `given IntOrd` part passes `IntOrd` as an argument for the `ord` parameter. But the point of implicit parameters is that this argument can also be left out (and it usually is). So the following