StreamT

sealed
class StreamT[M[_], A](val step: M[Step[A, StreamT[M, A]]])

StreamT monad transformer.

Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def ++(bs: => StreamT[M, A])(implicit m: Functor[M]): StreamT[M, A]
def ::(a: A)(implicit M: Applicative[M]): StreamT[M, A]
def asStream(implicit ev: M[Step[A, StreamT[M, A]]] === Id[Step[A, StreamT[Id, A]]]): Stream[A]

Converts this StreamT to a lazy Stream, i.e. without forcing evaluation of all elements. Note, however, that at least one element of this stream will be evaluated, and depending on the structure of this stream, up to two elements might be evaluated.

Converts this StreamT to a lazy Stream, i.e. without forcing evaluation of all elements. Note, however, that at least one element of this stream will be evaluated, and depending on the structure of this stream, up to two elements might be evaluated.

def drop(n: Int)(implicit M: Functor[M]): StreamT[M, A]
def dropWhile(p: A => Boolean)(implicit m: Functor[M]): StreamT[M, A]
def filter(p: A => Boolean)(implicit m: Functor[M]): StreamT[M, A]
def flatMap[B](f: A => StreamT[M, B])(implicit m: Functor[M]): StreamT[M, B]
def foldLeft[B](z: B)(f: (B, A) => B)(implicit M: Monad[M]): M[B]
def foldLeftRec[B](z: B)(f: (B, A) => B)(implicit M: BindRec[M]): M[B]
def foldMap[B](f: A => B)(implicit M: Foldable[M], B: Monoid[B]): B
def foldRight[B](z: => B)(f: (=> A, => B) => B)(implicit M: Monad[M]): M[B]
def foldRightM[B](z: => M[B])(f: (=> A, => M[B]) => M[B])(implicit M: Monad[M]): M[B]

foldRight with potential to terminate early, e.g. on an infinite stream.

foldRight with potential to terminate early, e.g. on an infinite stream.

def foldRightRec[B](z: => B)(f: (=> A, => B) => B)(implicit M: BindRec[M]): M[B]
def foreach(f: A => M[Unit])(implicit M: Monad[M]): M[Unit]
def foreachRec(f: A => M[Unit])(implicit M: Monad[M], B: BindRec[M]): M[Unit]
def head(implicit M: Monad[M]): M[A]
def headOption(implicit M: Monad[M]): M[Option[A]]
def headOptionRec(implicit M: BindRec[M]): M[Option[A]]
def headRec(implicit M: BindRec[M]): M[A]
def isEmpty(implicit M: Monad[M]): M[Boolean]
def isEmptyRec(implicit M: BindRec[M]): M[Boolean]
def length(implicit m: Monad[M]): M[Int]
def lengthRec(implicit M: BindRec[M]): M[Int]
def map[B](f: A => B)(implicit m: Functor[M]): StreamT[M, B]
def mapM[B](f: A => M[B])(implicit M: Monad[M]): StreamT[M, B]
Since

7.0.1

def tailM(implicit M: Monad[M]): M[StreamT[M, A]]
def tailMRec(implicit M: BindRec[M]): M[StreamT[M, A]]
def tailOption(implicit M: Monad[M]): M[Option[StreamT[M, A]]]
def tailOptionRec(implicit M: BindRec[M]): M[Option[StreamT[M, A]]]
def take(n: Int)(implicit M: Functor[M]): StreamT[M, A]
def takeWhile(p: A => Boolean)(implicit m: Functor[M]): StreamT[M, A]
def toStream(implicit M: Monad[M]): M[Stream[A]]

Warning: Requires evaluation of the whole stream. Depending on the monad M, the evaluation will happen either immediately, or will be deferred until the resulting Stream is extracted from the returned M.

Warning: Requires evaluation of the whole stream. Depending on the monad M, the evaluation will happen either immediately, or will be deferred until the resulting Stream is extracted from the returned M.

def toStreamRec(implicit M: BindRec[M]): M[Stream[A]]

Warning: Requires evaluation of the whole stream. Depending on the monad M, the evaluation will happen either immediately, or will be deferred until the resulting Stream is extracted from the returned M.

Warning: Requires evaluation of the whole stream. Depending on the monad M, the evaluation will happen either immediately, or will be deferred until the resulting Stream is extracted from the returned M.

def trans[N[_]](t: NaturalTransformation[M, N])(implicit M: Functor[M], N: Functor[N]): StreamT[N, A]
def uncons(implicit M: Monad[M]): M[Option[(A, StreamT[M, A])]]
def unconsRec(implicit M: BindRec[M]): M[Option[(A, StreamT[M, A])]]

Concrete fields

val step: M[Step[A, StreamT[M, A]]]