You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_docs/reference/experimental/fewer-braces.md
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -59,9 +59,13 @@ val xs = elems.map: x =>
59
59
xs.foldLeft (x, y) =>
60
60
x + y
61
61
```
62
-
Braces can be omitted if the lambda starts with a parameter list and an arrow symbol `=>` or `?=>`.
63
-
The arrow is followed on the next line(s) by the body of the functional literal which must be indented
64
-
relative to the previous line.
62
+
Braces can be omitted if the lambda starts with a parameter list and an arrow symbol `=>` or `?=>`. The arrow is followed by the body of the functional literal, which can be
63
+
either on the same line or as an indented block on the following lines. Example:
0 commit comments