sealed class StreamT[M[_], A] extends AnyRef
- Alphabetic
- By Inheritance
- StreamT
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- 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.Id[Step[A, StreamT[Id.Id, A]]]]): Stream[A]
Converts this
StreamT
to a lazyStream
, i.e.Converts this
StreamT
to a lazyStream
, 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.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
- val step: M[Step[A, StreamT[M, A]]]
- def tail(implicit m: Functor[M]): StreamT[M, A]
Don't use iteratively!
- def tailM(implicit M: Monad[M]): M[StreamT[M, A]]
- def tailMRec(implicit M: BindRec[M]): M[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.
**Warning:** Requires evaluation of the whole stream. Depending on the monad
M
, the evaluation will happen either immediately, or will be deferred until the resultingStream
is extracted from the returnedM
. - def toStreamRec(implicit M: BindRec[M]): M[Stream[A]]
**Warning:** Requires evaluation of the whole stream.
**Warning:** Requires evaluation of the whole stream. Depending on the monad
M
, the evaluation will happen either immediately, or will be deferred until the resultingStream
is extracted from the returnedM
. - def trans[N[_]](t: ~>[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])]]