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>
1717 case i if i % 2 == 0 => Future .successful(i.toString)
1818 case i => Future .failed(ThatsOdd (i))
1919 }
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
77
88@ main def TryFutureFold =
99 var accumulator = " " // <1>
10- def update (s: String ) = accumulator.synchronized { accumulator += s}
10+ def update (s: String ) = accumulator.synchronized { accumulator += s }
1111
1212 val futures = (0 to 9 ) map { // <2>
1313 i => Future {
Original file line number Diff line number Diff line change 22import scala .compiletime .summonAll
33
44trait 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 {}
77
88summonAll[C *: D *: EmptyTuple ]
99summonAll[C *: D *: E *: EmptyTuple ] // <1>
Original file line number Diff line number Diff line change 11// tag::dtlist[]
22// src/script/scala/progscala3/typesystem/deptypes/DependentTypes.scala
33
4- import scala .compiletime .ops .S
54import scala .compiletime .ops .int .*
65
76sealed trait DTList [N <: Int ]: // <1>
You can’t perform that action at this time.
0 commit comments