diff options
author | Paul Phillips <paulp@improving.org> | 2009-08-17 20:42:48 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-08-17 20:42:48 +0000 |
commit | 22fcda03418bafc85f6fd6f38f2478677b99c932 (patch) | |
tree | 86b6794f3a0dcabb591d4ff077e19f8008434685 /test/files/neg | |
parent | d0ca666b758fa9f6060361848dc410b81e5cb1ed (diff) | |
download | scala-22fcda03418bafc85f6fd6f38f2478677b99c932.tar.gz scala-22fcda03418bafc85f6fd6f38f2478677b99c932.tar.bz2 scala-22fcda03418bafc85f6fd6f38f2478677b99c932.zip |
Fixed both versions of Iterator.iterate, which ...
Fixed both versions of Iterator.iterate, which were a bit off, and gave
them type parameters.
Before: Iterator.iterate(5, 10)(_ + 1) toList
res0: List[Int] = List(6, 6, 6, 6, 6, 6, 6, 6, 6, 6)
After: Iterator.iterate(5L)(_ + 1) take 10 toList
res1: List[Long] = List(5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
Also, I deprecated the two argument version because
def iterate[T](start: T, len: Int)(f: T => T)
is identical to
iterate(start)(f) take len
Diffstat (limited to 'test/files/neg')
0 files changed, 0 insertions, 0 deletions