Aladdin - Scala Bugtracking
[#1147] project: api priority: low category: missing feature
submitter assigned to status date submitted
Nikolay Sean fixed 2007-05-30 13:02:25.0
subject [contrib #561] Iterable.Projection.drop should return Projection for consistency
code
Iterable.Projection.drop should return Projection for consistency
with RandomAccessSeq.Projection.drop that returns Projection.

Also, Iterable.Projection.take and maybe others.

The code:

===
val s = Stream.from(1)
println(s.projection.drop(2).elements.next))
===

causes OOME

checked on Scala from trunk
what happened
OutOfMemoryError
what expected 3
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-05-30 13:08:34.0
Sean  edited on  2007-07-17 17:56:00.0
Stream is now a Seq.Projection, so its lazy drop method will be used when a projection is made. Also, laziness is now used for drop/take/slice when possible even if a projection is not specified.