diff options
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/Range.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/Range.scala b/src/library/scala/Range.scala index 65ed5b5ea1..1f46385fc7 100644 --- a/src/library/scala/Range.scala +++ b/src/library/scala/Range.scala @@ -37,5 +37,5 @@ class Range(val start: Int, val end: Int, val step: Int) extends BufferedIterato 1 + (Math.abs(start - end) - 1) / Math.abs(step) def contains(x: Int): Boolean = - Iterator.range(0, length) exists { x == start + _ * step } + Iterator.range(0, length) exists (i => x == start + i * step) } |