range
object Collection {
def range[A](start: A, end: A): Collection[A]
def range[A](start: A, end: A, step: A): Collection[A]
}
range
creates a collection using as elements the sequence of values that starts with start
and stops before reaching end
.
The increment used to calculate the next value in the sequence can be specified using step
.