author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Mon, 05 Aug 2019 20:14:06 +0100 | |
changeset 269 | 86a85865e772 |
parent 95 | 4fa7231fede7 |
permissions | -rw-r--r-- |
94
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1 |
import scala.concurrent._ |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
2 |
import scala.concurrent.duration._ |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3 |
import ExecutionContext.Implicits.global |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
4 |
import scala.language.postfixOps |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
5 |
|
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
6 |
|
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
7 |
|
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
8 |
lazy val f = Future { |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
9 |
assert(fixpT((x:Int) => if (200000 < x) x else x + 1, 0) == 200001) |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
10 |
assert(fixpT((x:Long) => if (20 < x) x else x + 1, 0L) == 21L) |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
11 |
} |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
12 |
|
95
4fa7231fede7
added link file
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
94
diff
changeset
|
13 |
Await.result(f, 90 second) |