diff --git a/library/collection/List.scala b/library/collection/List.scala index 4462aca308c5f1756ab9ff5b9e9f42b8a8cc6c8f..be664ba81e92059210ca0661c41e98efb41abb3c 100644 --- a/library/collection/List.scala +++ b/library/collection/List.scala @@ -503,6 +503,12 @@ object List { } l.reverse } + + def fill[T](n: BigInt)(x: T) : List[T] = { + if (n <= 0) Nil[T] + else Cons[T](x, fill[T](n-1)(x)) + } ensuring(res => (res.content == (if (n <= BigInt(0)) Set.empty[T] else Set(x))) && + res.size == (if (n <= BigInt(0)) BigInt(0) else n)) } @library diff --git a/scripts/sbt-test-regression b/scripts/sbt-test-regression new file mode 100755 index 0000000000000000000000000000000000000000..7606e7a37bb3dcd2b48aa210a763dbca97f0e938 --- /dev/null +++ b/scripts/sbt-test-regression @@ -0,0 +1,2 @@ +sbt test integration:test regression:test 2>&1 | tee regression.log +