File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ function `map` which is available for collections in Scala.
24
24
{% tabs map_example_1 class=tabs-scala-version %}
25
25
26
26
{% tab 'Scala 2 and 3' for=map_example_1 %}
27
- ``` scala mdoc
27
+ ``` scala
28
28
val salaries = Seq (20_000 , 70_000 , 40_000 )
29
29
val doubleSalary = (x : Int ) => x * 2
30
30
val newSalaries = salaries.map(doubleSalary) // List(40000, 140000, 80000)
@@ -42,7 +42,7 @@ an argument to map:
42
42
{% tabs map_example_2 class=tabs-scala-version %}
43
43
44
44
{% tab 'Scala 2 and 3' for=map_example_2 %}
45
- ``` scala mdoc:nest
45
+ ``` scala
46
46
val salaries = Seq (20_000 , 70_000 , 40_000 )
47
47
val newSalaries = salaries.map(x => x * 2 ) // List(40000, 140000, 80000)
48
48
```
@@ -56,7 +56,7 @@ compiler can infer the type based on the type of function map expects (see [Curr
56
56
{% tabs map_example_3 class=tabs-scala-version %}
57
57
58
58
{% tab 'Scala 2 and 3' for=map_example_3 %}
59
- ``` scala mdoc:nest
59
+ ``` scala
60
60
val salaries = Seq (20_000 , 70_000 , 40_000 )
61
61
val newSalaries = salaries.map(_ * 2 )
62
62
```
You can’t perform that action at this time.
0 commit comments