Skip to content

restore mdoc checking to higher order fns #2543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions _tour/higher-order-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function `map` which is available for collections in Scala.
{% tabs map_example_1 class=tabs-scala-version %}

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

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

{% tab 'Scala 2 and 3' for=map_example_3 %}
```scala
```scala mdoc:nest
val salaries = Seq(20_000, 70_000, 40_000)
val newSalaries = salaries.map(_ * 2)
```
Expand Down