Skip to content

Commit d4ddbeb

Browse files
committed
Merge branch 'change-fewerbraces-1' of https://github.com/dotty-staging/dotty into change-fewerbraces-1
2 parents 5b9b1a4 + d3dd7dd commit d4ddbeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/_docs/reference/experimental/fewer-braces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The `:` can optionally be followed by the parameter part of a function literal:
5656
val xs = elems.map: x =>
5757
val y = x - 1
5858
y * y
59-
xs.foldLeft (x, y) =>
59+
xs.foldLeft(0): (x, y) =>
6060
x + y
6161
```
6262
Braces can be omitted if the lambda starts with a parameter list and an arrow symbol `=>` or `?=>`.

0 commit comments

Comments
 (0)