summaryrefslogtreecommitdiff
path: root/test/files/run/enrich-gentraversable.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-09-18 00:09:46 -0700
committerPaul Phillips <paulp@improving.org>2013-09-18 07:13:38 -0700
commitf4267ccd96a9143c910c66a5b0436aaa64b7c9dc (patch)
tree174861715807c23ba332f78769a9f7e1377b7f02 /test/files/run/enrich-gentraversable.scala
parentd45a3c8cc8e9f1d95d797d548a85abd8597f5bc7 (diff)
downloadscala-f4267ccd96a9143c910c66a5b0436aaa64b7c9dc.tar.gz
scala-f4267ccd96a9143c910c66a5b0436aaa64b7c9dc.tar.bz2
scala-f4267ccd96a9143c910c66a5b0436aaa64b7c9dc.zip
Cull extraneous whitespace.
One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in.
Diffstat (limited to 'test/files/run/enrich-gentraversable.scala')
-rw-r--r--test/files/run/enrich-gentraversable.scala18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/files/run/enrich-gentraversable.scala b/test/files/run/enrich-gentraversable.scala
index 0f79a47030..36412e650e 100644
--- a/test/files/run/enrich-gentraversable.scala
+++ b/test/files/run/enrich-gentraversable.scala
@@ -13,22 +13,22 @@ object Test extends App {
}
implicit def filterMap[Repr, A](r: Repr)(implicit fr: IsTraversableLike[Repr]): FilterMapImpl[fr.A,Repr] =
new FilterMapImpl[fr.A, Repr](fr.conversion(r))
-
+
val l = List(1, 2, 3, 4, 5)
val fml = l.filterMap(i => if(i % 2 == 0) Some(i) else None)
typed[List[Int]](fml)
println(fml)
-
+
val a = Array(1, 2, 3, 4, 5)
val fma = a.filterMap(i => if(i % 2 == 0) Some(i) else None)
typed[Array[Int]](fma)
println(fma.deep)
-
+
val s = "Hello World"
val fms1 = s.filterMap(c => if(c >= 'A' && c <= 'Z') Some(c) else None)
typed[String](fms1)
println(fms1)
-
+
val fms2 = s.filterMap(c =>if(c % 2 == 0) Some(c.toInt) else None)
typed[IndexedSeq[Int]](fms2)
println(fms2)
@@ -38,28 +38,28 @@ object Test extends App {
final def filterMap[B, That](f: A => Option[B])(implicit cbf: CanBuildFrom[Repr, B, That]): That = {
val b = cbf()
for(e <- r.seq) f(e) foreach (b +=)
-
+
b.result
}
}
implicit def filterMap[Repr, A](r: Repr)(implicit fr: IsTraversableOnce[Repr]): FilterMapImpl[fr.A,Repr] =
new FilterMapImpl[fr.A, Repr](fr.conversion(r))
-
+
val l = List(1, 2, 3, 4, 5)
val fml = l.filterMap(i => if(i % 2 == 0) Some(i) else None)
typed[List[Int]](fml)
println(fml)
-
+
val a = Array(1, 2, 3, 4, 5)
val fma = a.filterMap(i => if(i % 2 == 0) Some(i) else None)
typed[Array[Int]](fma)
println(fma.deep)
-
+
val s = "Hello World"
val fms1 = s.filterMap(c => if(c >= 'A' && c <= 'Z') Some(c) else None)
typed[String](fms1)
println(fms1)
-
+
val fms2 = s.filterMap(c =>if(c % 2 == 0) Some(c.toInt) else None)
typed[IndexedSeq[Int]](fms2)
println(fms2)