Skip to content

Commit 6c5b599

Browse files
authored
Merge branch 'scala:main' into main
2 parents 885d467 + 24d4806 commit 6c5b599

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

_overviews/quasiquotes/syntax-summary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ permalink: /overviews/quasiquotes/:title.html
120120
  | Quasiquote | Type
121121
------------------------------|-----------------------------------------------------------------------------------------------------------------------------|-----------
122122
[Val][401] | `q"$mods val $tname: $tpt = $expr"` or `q"$mods val $pat = $expr"` | ValDef
123-
[Var][401] | `q"$mods var $tname: $tpt = $expr"` or `q"$mods val $pat = $expr"` | ValDef
123+
[Var][401] | `q"$mods var $tname: $tpt = $expr"` or `q"$mods var $pat = $expr"` | ValDef
124124
[Val Pattern][403] | `q"$mods val $pat: $tpt = $expr"` | Tree
125125
[Var Pattern][404] | `q"$mods var $pat: $tpt = $expr"` | Tree
126126
[Method][403] | `q"$mods def $tname[..$tparams](...$paramss): $tpt = $expr"` | DefDef

_overviews/scala-book/collections-maps.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,18 @@ Here are some things you can do with a mutable `Map`:
8383
```scala
8484
// add elements with +=
8585
states += ("AZ" -> "Arizona")
86-
states += ("CO" -> "Colorado", "KY" -> "Kentucky")
86+
states ++= Map("CO" -> "Colorado", "KY" -> "Kentucky")
8787

8888
// remove elements with -=
8989
states -= "KY"
90-
states -= ("AZ", "CO")
90+
states --= List("AZ", "CO")
9191

9292
// update elements by reassigning them
9393
states("AK") = "Alaska, The Big State"
9494

95-
// retain elements by supplying a function that operates on
95+
// filter elements by supplying a function that operates on
9696
// the keys and/or values
97-
states.retain((k,v) => k == "AK")
97+
states.filterInPlace((k,v) => k == "AK")
9898
```
9999

100100

0 commit comments

Comments
 (0)