From 28c96ad64c349d662bba5d900ff2ca7efe1c15d3 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Mon, 24 Feb 2020 18:43:36 +0100 Subject: [PATCH 1/2] doc(dep-fun-type): typos --- docs/docs/reference/new-types/dependent-function-types.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/reference/new-types/dependent-function-types.md b/docs/docs/reference/new-types/dependent-function-types.md index dc1154cb8372..9b1bc236ce21 100644 --- a/docs/docs/reference/new-types/dependent-function-types.md +++ b/docs/docs/reference/new-types/dependent-function-types.md @@ -11,13 +11,13 @@ trait Entry { type Key; val key: Key } def extractKey(e: Entry): e.Key = e.key // a dependent method val extractor: (e: Entry) => e.Key = extractKey // a dependent function value // ║ ⇓ ⇓ ⇓ ⇓ ⇓ ⇓ ⇓ ║ -// ║ Dependent ║ -// ║ Function Type ║ -// ╚═══════════════════╝ +// ║ Dependent ║ +// ║ Function Type ║ +// ╚═══════════════╝ ``` Scala already has _dependent methods_, i.e. methods where the result type refers to some of the parameters of the method. Method -`extractKey` is an example. Its result type, `e.Key` refers its +`extractKey` is an example. Its result type, `e.Key` refers to its parameter `e` (we also say, `e.Key` _depends_ on `e`). But so far it was not possible to turn such methods into function values, so that they can be passed as parameters to other functions, or returned as From 12773ecd26db2d8c0c3932b164ce1262878b38c9 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Thu, 27 Feb 2020 14:41:35 +0100 Subject: [PATCH 2/2] revert ascii-doc change --- docs/docs/reference/new-types/dependent-function-types.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/reference/new-types/dependent-function-types.md b/docs/docs/reference/new-types/dependent-function-types.md index 9b1bc236ce21..b7003d7c66fc 100644 --- a/docs/docs/reference/new-types/dependent-function-types.md +++ b/docs/docs/reference/new-types/dependent-function-types.md @@ -11,9 +11,9 @@ trait Entry { type Key; val key: Key } def extractKey(e: Entry): e.Key = e.key // a dependent method val extractor: (e: Entry) => e.Key = extractKey // a dependent function value // ║ ⇓ ⇓ ⇓ ⇓ ⇓ ⇓ ⇓ ║ -// ║ Dependent ║ -// ║ Function Type ║ -// ╚═══════════════╝ +// ║ Dependent ║ +// ║ Function Type ║ +// ╚═══════════════════╝ ``` Scala already has _dependent methods_, i.e. methods where the result type refers to some of the parameters of the method. Method