Skip to content

Commit 28d207d

Browse files
authored
Update indentation.md
1 parent 9819742 commit 28d207d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/_docs/reference/other-new-features/indentation.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ Indentation can be mixed freely with braces `{...}`, as well as brackets `[...]`
261261
For instance, consider:
262262
```scala
263263
{
264-
val x = f(x: Int, y =>
264+
val x = 4
265+
f(x: Int, y =>
265266
x * (
266267
y + 1
267268
) +
@@ -270,13 +271,13 @@ For instance, consider:
270271
)
271272
}
272273
```
273-
- Here, the indentation width of the region enclosed by the braces is 3 (i.e. the indentation width of the
274+
- Here, the indentation width of the region enclosed by the braces is 2 (i.e. the indentation width of the
274275
statement starting with `val`).
275-
- The indentation width of the region in parentheses that follows `f` is also 3, since the opening
276+
- The indentation width of the region in parentheses that follows `f` is also 2, since the opening
276277
parenthesis is not at the end of a line.
277-
- The indentation width of the region in parentheses around `y + 1` is 9
278+
- The indentation width of the region in parentheses around `y + 1` is 6
278279
(i.e. the indentation width of `y + 1`).
279-
- Finally, the indentation width of the last region in parentheses starting with `(x` is 6 (i.e. the indentation width of the indented region following the `=>`.
280+
- Finally, the indentation width of the last region in parentheses starting with `(x` is 4 (i.e. the indentation width of the indented region following the `=>`.
280281
281282
## Special Treatment of Case Clauses
282283

0 commit comments

Comments
 (0)