Skip to content

Commit c46da16

Browse files
committed
Fix examples
1 parent ff1a3a1 commit c46da16

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/better-fors.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ This SIP suggests the following changes to `for` comprehensions:
133133
will be desugared to
134134

135135
```scala
136-
Some(1).map { a =>
136+
doSth(arg).map { a =>
137137
val b = a
138138
(a, b)
139139
}.withFilter { case (a, b) =>
@@ -234,7 +234,7 @@ yield a + b
234234
will be desugared to:
235235

236236
```scala
237-
Some(1).map { a =>
237+
doSth(arg).map { a =>
238238
val b = a
239239
(a, b)
240240
}.map { case (a, b) =>
@@ -319,7 +319,7 @@ yield a + b
319319
will be desugared to
320320

321321
```scala
322-
Some(1).map { a =>
322+
doSth(arg).map { a =>
323323
val b = a
324324
(a, b)
325325
}.withFilter { case (a, b) =>
@@ -372,4 +372,4 @@ As far as I know, there are no widely used Scala 3 libraries that depend on the
372372
2. Github issue discussion about for desugaring: https://github.com/lampepfl/dotty/issues/2573
373373
3. Scala 2 implementation of some of the improvements: https://github.com/oleg-py/better-monadic-for
374374
4. Implementation of one of the simplifications: https://github.com/lampepfl/dotty/pull/16703
375-
5. WIP implementation branch: https://github.com/dotty-staging/dotty/tree/improved-fors
375+
5. Draft implementation branch: https://github.com/dotty-staging/dotty/tree/improved-fors

0 commit comments

Comments
 (0)