|
|
Scala 2.3.3
|
object
Stream
extends java.lang.Object
with scala.ScalaObject
Stream provides helper functions
to manipulate streams.| Constructor Summary | |
def
this
|
|
| Val Summary | |
val
empty
: scala.Stream[scala.Nothing]
The empty stream |
|
| Def Summary | |
def
concat
[a]
(s1: scala.Stream[a], s2: scala.Stream[a], ss: scala.Stream[a]*)
: scala.Stream[a]
The concatenation of all given streams |
|
def
concat
[a]
(xs: scala.Iterable[scala.Stream[a]])
: scala.Stream[a]
The concatenation of a sequence of streams |
|
def
concat
[a]
(xs: scala.Iterator[scala.Stream[a]])
: scala.Stream[a]
The concatenation of all streams returned by an iterator |
|
def
cons
[a]
(hd: a, tl: => scala.Stream[a])
: java.lang.Object with scala.Stream[a]
A stream consisting of a given first element and remaining elements |
|
def
from
(start: scala.Int)
: scala.Stream[scala.Int]
Create an infinite stream starting at start
and incrementing by 1.
|
|
def
from
(start: scala.Int, step: scala.Int)
: scala.Stream[scala.Int]
Create an infinite stream starting at start
and incrementing by step step
|
|
def
fromIterator
[a]
(it: scala.Iterator[a])
: scala.Stream[a]
A stream containing all elements of a given iterator, in the order they are produced. |
|
def
range
(start: scala.Int, end: scala.Int)
: scala.Stream[scala.Int]
Create a stream with element values vn+1 = vn + 1
where v0 = start
and vi < end.
|
|
def
range
(start: scala.Int, end: scala.Int, step: (scala.Int) => scala.Int)
: scala.Stream[scala.Int]
Create a stream with element values vn+1 = step(vn)
where v0 = start
and vi < end.
|
|
def
range
(start: scala.Int, end: scala.Int, step: scala.Int)
: scala.Stream[scala.Int]
Create a stream with element values vn+1 = vn + step
where v0 = start
and vi < end.
|
|
| Constructor Detail |
| Val Detail |
| Def Detail |
def
concat
[a](s1: scala.Stream[a], s2: scala.Stream[a], ss: scala.Stream[a]*): scala.Stream[a]
def
concat
[a](xs: scala.Iterable[scala.Stream[a]]): scala.Stream[a]
def
concat
[a](xs: scala.Iterator[scala.Stream[a]]): scala.Stream[a]
def
cons
[a](hd: a, tl: => scala.Stream[a]): java.lang.Object with scala.Stream[a]
hd - The first element of the result stream
tl - The remaining elements of the result stream
def
from
(start: scala.Int): scala.Stream[scala.Int]
start
and incrementing by 1.start - the start value of the stream
start.
def
from
(start: scala.Int, step: scala.Int): scala.Stream[scala.Int]
start
and incrementing by step stepstart - the start value of the stream
step - the increment value of the stream
start.
def
fromIterator
[a](it: scala.Iterator[a]): scala.Stream[a]
it - The iterator producing the stream's elements
def
range
(start: scala.Int, end: scala.Int): scala.Stream[scala.Int]
vn+1 = vn + 1
where v0 = start
and vi < end.start - the start value of the stream
end - the end value of the stream
start.
def
range
(start: scala.Int, end: scala.Int, step: (scala.Int) => scala.Int): scala.Stream[scala.Int]
vn+1 = step(vn)
where v0 = start
and vi < end.start - the start value of the stream
end - the end value of the stream
step - the increment function of the stream
start.
def
range
(start: scala.Int, end: scala.Int, step: scala.Int): scala.Stream[scala.Int]
vn+1 = vn + step
where v0 = start
and vi < end.start - the start value of the stream
end - the end value of the stream
step - the increment value of the stream
start.