Skip to content

Commit da50f9e

Browse files
committed
Evaluate snippets with mdoc
1 parent 0f31bf1 commit da50f9e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

_overviews/collections-2.13/conversion-between-option-and-the-collections.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ permalink: /overviews/collections-2.13/:title.html
1313

1414
Hence `Option` can be used everywhere an `IterableOnce` is expected, for example, when calling `flatMap` on a collection (or inside a for-comprehension)
1515

16-
```
17-
scala> for {
18-
| a <- Set(1)
19-
| b <- Option(41)
20-
| } yield (a + b)
21-
val res0: scala.collection.immutable.Set[Int] = Set(42)
16+
```scala mdoc
17+
for {
18+
a <- Set(1)
19+
b <- Option(41)
20+
} yield (a + b)
2221
```
2322

2423
since the operation `flatMap` on the type `Set[Int]` takes a function returning an `IterableOnce`:

0 commit comments

Comments
 (0)