Skip to content

Commit 771d3c2

Browse files
authored
Update higher-order-functions.md
1 parent 085fd80 commit 771d3c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_tour/higher-order-functions.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function `map` which is available for collections in Scala.
2424
{% tabs map_example_1 class=tabs-scala-version %}
2525

2626
{% tab 'Scala 2 and 3' for=map_example_1 %}
27-
```scala mdoc
27+
```scala
2828
val salaries = Seq(20_000, 70_000, 40_000)
2929
val doubleSalary = (x: Int) => x * 2
3030
val newSalaries = salaries.map(doubleSalary) // List(40000, 140000, 80000)
@@ -42,7 +42,7 @@ an argument to map:
4242
{% tabs map_example_2 class=tabs-scala-version %}
4343

4444
{% tab 'Scala 2 and 3' for=map_example_2 %}
45-
```scala mdoc:nest
45+
```scala
4646
val salaries = Seq(20_000, 70_000, 40_000)
4747
val newSalaries = salaries.map(x => x * 2) // List(40000, 140000, 80000)
4848
```
@@ -56,7 +56,7 @@ compiler can infer the type based on the type of function map expects (see [Curr
5656
{% tabs map_example_3 class=tabs-scala-version %}
5757

5858
{% tab 'Scala 2 and 3' for=map_example_3 %}
59-
```scala mdoc:nest
59+
```scala
6060
val salaries = Seq(20_000, 70_000, 40_000)
6161
val newSalaries = salaries.map(_ * 2)
6262
```

0 commit comments

Comments
 (0)