File tree Expand file tree Collapse file tree 4 files changed +4
-5
lines changed
main/scala/progscala3/concurrency/futures Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ val doComplete: Try[String] => Unit = // <2>
17
17
case i if i % 2 == 0 => Future .successful(i.toString)
18
18
case i => Future .failed(ThatsOdd (i))
19
19
}
20
- futures.map(_.onComplete(doComplete)) // <5>
20
+ futures.map(_.onComplete(doComplete)) // <5>
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import scala.concurrent.ExecutionContext.Implicits.global
7
7
8
8
@ main def TryFutureFold =
9
9
var accumulator = " " // <1>
10
- def update (s: String ) = accumulator.synchronized { accumulator += s}
10
+ def update (s: String ) = accumulator.synchronized { accumulator += s }
11
11
12
12
val futures = (0 to 9 ) map { // <2>
13
13
i => Future {
Original file line number Diff line number Diff line change 2
2
import scala .compiletime .summonAll
3
3
4
4
trait C ; trait D ; trait E
5
- given a : C with {}
6
- given b : D with {}
5
+ given c : C with {}
6
+ given d : D with {}
7
7
8
8
summonAll[C *: D *: EmptyTuple ]
9
9
summonAll[C *: D *: E *: EmptyTuple ] // <1>
Original file line number Diff line number Diff line change 1
1
// tag::dtlist[]
2
2
// src/script/scala/progscala3/typesystem/deptypes/DependentTypes.scala
3
3
4
- import scala .compiletime .ops .S
5
4
import scala .compiletime .ops .int .*
6
5
7
6
sealed trait DTList [N <: Int ]: // <1>
You can’t perform that action at this time.
0 commit comments