|
Scala Library Documentation
|
|
scala/Stream.scala]
object
Stream
extends AnyRefStream provides helper functions
to manipulate streams.| Value Summary | |
val
|
empty
: Stream[Nothing]
The empty stream
|
| Method Summary | |
def
|
concat
[a](s1 : Stream[a], s2 : Stream[a], ss : Stream[a]*) : Stream[a]
The concatenation of all given streams
|
def
|
concat
[a](xs : Iterable[Stream[a]]) : Stream[a]
The concatenation of a sequence of streams
|
def
|
concat
[a](xs : Iterator[Stream[a]]) : Stream[a]
The concatenation of all streams returned by an iterator
|
def
|
from
(start : Int, step : Int) : Stream[Int]
Create an infinite stream starting at
start
and incrementing by step step |
def
|
from
(start : Int) : Stream[Int]
Create an infinite stream starting at
start
and incrementing by 1. |
def
|
fromIterator
[a](it : Iterator[a]) : Stream[a]
A stream containing all elements of a given iterator, in the order they are produced.
|
def
|
range
(start : Int, end : Int) : Stream[Int]
Create a stream with element values
vn+1 = vn + 1
where v0 = start
and vi < end. |
def
|
range
(start : Int, end : Int, step : (Int) => Int) : Stream[Int]
Create a stream with element values
vn+1 = step(vn)
where v0 = start
and vi < end. |
def
|
range
(start : Int, end : Int, step : Int) : Stream[Int]
Create a stream with element values
vn+1 = vn + step
where v0 = start
and vi < end. |
| Methods inherited from AnyRef | |
| getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Object Summary | |
object
|
cons
extends AnyRef
|
| Value Details |
| Method Details |
it - The iterator producing the stream's elementsvn+1 = vn + 1
where v0 = start
and vi < end.start - the start value of the streamend - the end value of the streamstart.vn+1 = vn + step
where v0 = start
and vi < end.start - the start value of the streamend - the end value of the streamstep - the increment value of the streamstart.vn+1 = step(vn)
where v0 = start
and vi < end.start - the start value of the streamend - the end value of the streamstep - the increment function of the streamstart.start
and incrementing by step stepstart - the start value of the streamstep - the increment value of the streamstart.start
and incrementing by 1.start - the start value of the streamstart.|
Scala Library Documentation
|
|