Skip to content

Commit 591edbe

Browse files
committed
Fix a code example syntax
1 parent e43d09f commit 591edbe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/docs/reference/new-types/dependent-function-types-spec.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ Initial implementation in [PR #3464](https://github.com/lampepfl/dotty/pull/3464
77

88
## Syntax
99

10-
```
10+
```ebnf
1111
FunArgTypes ::= InfixType
1212
| ‘(’ [ FunArgType {',' FunArgType } ] ‘)’
1313
| ‘(’ TypedFunParam {',' TypedFunParam } ‘)’
1414
TypedFunParam ::= id ‘:’ Type
1515
```
1616

1717
Dependent function types associate to the right, e.g.
18-
`(s: S) (t: T) U` is the same as `(s: S) ((t: T) U)`.
18+
`(s: S) => (t: T) => U` is the same as `(s: S) => ((t: T) => U)`.
1919

2020
## Implementation
2121

@@ -25,7 +25,7 @@ refinement types of `scala.FunctionN`. A dependent function type
2525
`(x1: K1, ..., xN: KN) => R` of arity `N` translates to:
2626

2727
```scala
28-
FunctionN[K1, ..., Kn, R'] with
28+
FunctionN[K1, ..., Kn, R']:
2929
def apply(x1: K1, ..., xN: KN): R
3030
```
3131

0 commit comments

Comments
 (0)