Create a stream from two or more values.
Create a stream consisting of a single A
value.
Create a stream from A
and F[StreamingT[F, A]]
values.
Create a stream from an F[StreamingT[F, A]]
value.
Create an empty stream of type A.
Create a stream from a list.
Create a stream from a vector.
Create a stream consisting of a single F[A]
.
Contains syntax for F[Streaming[F, A]].
Contains syntax for F[Streaming[F, A]].
To eanble this, say:
import cats.data.StreamingT.syntax._
This provides the %:: and %::: operators for prepending to an F[Streaming[F, A]] value, as well as a lazy Streaming[F, A] value. This mirrors the methods of the same name which can be used to prepend to a Streaming[F, A] value.
In order to support laziness when using F[Streaming[F, A]] values, the type constructor F[_] must support laziness, and the F[Streaming[F, A]] value must be constructed lazily.
For example, StreamingT[Option, ?]
cannot support laziness,
because Option[_] is eager.
Additionally, x %:: Future.successful(xs)
will not produce a
lazy StreamT[Future, ?], since xs
will already have been
evaluated.
Produce a stream given an "unfolding" function.
Produce a stream given an "unfolding" function.
None represents an empty stream. Some(a) reprsents an initial element, and we can compute the tail (if any) via f(a).
Create a stream from an F[StreamingT[F, A]]
value.