diff --git a/library/collection/List.scala b/library/collection/List.scala index 8e10e0d3510524b2ac0ede00a29403a70c880936..60519f3c0b86d076991210e58671e04eaa6c2ff6 100644 --- a/library/collection/List.scala +++ b/library/collection/List.scala @@ -98,7 +98,7 @@ sealed abstract class List[T] { )} def slice(from: BigInt, to: BigInt): List[T] = { - require(from < to && to < size && from >= 0) + require(0 <= from && from <= to && to <= size) drop(from).take(to-from) }