From 9df7a00a5ca2f5c41c6e6f197b60e25574512bc6 Mon Sep 17 00:00:00 2001 From: Gabriel Volpe Date: Tue, 13 Sep 2022 12:48:22 +0200 Subject: [PATCH 1/2] Update Lambda args without braces docs At least on the latest nightly (Scala 3.2.2-RC1-bin-20220910-ac6cd1c-NIGHTLY), the example without colons doesn't seem to work. Also, the `foldLeft` call seems to be missing the initial value. --- docs/_docs/reference/experimental/fewer-braces.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_docs/reference/experimental/fewer-braces.md b/docs/_docs/reference/experimental/fewer-braces.md index 644875c3774f..f9a856dec39e 100644 --- a/docs/_docs/reference/experimental/fewer-braces.md +++ b/docs/_docs/reference/experimental/fewer-braces.md @@ -52,11 +52,11 @@ val firstLine = files.get(fileName).fold: Braces can also be omitted around multiple line function value arguments: ```scala -val xs = elems.map x => +val xs = List.range(1, 10).map: x => val y = x - 1 y * y -xs.foldLeft (x, y) => - x + y +xs.foldLeft(0): (x, y) => + x + y * 8 ``` Braces can be omitted if the lambda starts with a parameter list and `=>` or `=>?` at the end of one line and it has an indented body on the following lines. From c1bf66680c6ab4231526437c645b4a63facec7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Marks?= Date: Thu, 13 Oct 2022 14:32:17 +0200 Subject: [PATCH 2/2] Bump version of reference documentation to 3.2.0 --- project/Build.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Build.scala b/project/Build.scala index 83677230a879..2eb9a15291c3 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -1413,7 +1413,7 @@ object Build { .add(OutputDir("scaladoc/output/reference")) .add(SiteRoot(s"${temp.getAbsolutePath}/docs")) .add(ProjectName("Scala 3 Reference")) - .add(ProjectVersion("3.1.3")) // TODO: Change that later to the current version tag. (This must happen on first forward this branch to stable release tag) + .add(ProjectVersion("3.2.0")) // TODO: Change that later to the current version tag. (This must happen on first forward this branch to stable release tag) .remove[VersionsDictionaryUrl] .add(SourceLinks(List( s"${temp.getAbsolutePath}=github://lampepfl/dotty/language-reference-stable"