File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
docs/docs/reference/new-types Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ trait Entry { type Key; val key: Key }
11
11
def extractKey (e : Entry ): e.Key = e.key // a dependent method
12
12
val extractor : (e : Entry ) => e.Key = extractKey // a dependent function value
13
13
// ║ ⇓ ⇓ ⇓ ⇓ ⇓ ⇓ ⇓ ║
14
- // ║ Dependent ║
15
- // ║ Function Type ║
16
- // ╚═══════════════════ ╝
14
+ // ║ Dependent ║
15
+ // ║ Function Type ║
16
+ // ╚═══════════════╝
17
17
```
18
18
Scala already has _ dependent methods_ , i.e. methods where the result
19
19
type refers to some of the parameters of the method. Method
20
- ` extractKey ` is an example. Its result type, ` e.Key ` refers its
20
+ ` extractKey ` is an example. Its result type, ` e.Key ` refers to its
21
21
parameter ` e ` (we also say, ` e.Key ` _ depends_ on ` e ` ). But so far it
22
22
was not possible to turn such methods into function values, so that
23
23
they can be passed as parameters to other functions, or returned as
You can’t perform that action at this time.
0 commit comments