diff options
author | Paul Phillips <paulp@improving.org> | 2011-06-13 20:51:39 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-06-13 20:51:39 +0000 |
commit | 32d2b15d5db3e9e582632cc8f995dcc362751d6a (patch) | |
tree | f55d67b49b8faf1d9fceca9228caaefeebebf3ab /test/files/run/t0807.scala | |
parent | 21584ed38ea6cbb8932206608ce47d975a127d8d (diff) | |
download | scala-32d2b15d5db3e9e582632cc8f995dcc362751d6a.tar.gz scala-32d2b15d5db3e9e582632cc8f995dcc362751d6a.tar.bz2 scala-32d2b15d5db3e9e582632cc8f995dcc362751d6a.zip |
Views using methods implemented in terms of isE...
Views using methods implemented in terms of isEmpty (in particular,
headOption and lastOption) were traversing the collection twice up
to the nonEmpty element, because "if (isEmpty) None else Some(head)"
means calling isEmpty separately from head. I overrode those methods in
TraversableViewLike to avoid the second traversal.
This leaves at least init and tail still in that boat, but they were
getting too involved.
How do I say "review by pool of reviewers", who can help set that up? In
the meantime no review.
Diffstat (limited to 'test/files/run/t0807.scala')
0 files changed, 0 insertions, 0 deletions