Packages

sealed class StreamT[M[_], A] extends AnyRef

StreamT monad transformer.

Source
StreamT.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StreamT
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new StreamT(step: M[Step[A, StreamT[M, A]]])

Value Members

  1. def ++(bs: => StreamT[M, A])(implicit m: Functor[M]): StreamT[M, A]
  2. def ::(a: => A)(implicit M: Applicative[M]): StreamT[M, A]
  3. 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 lazy Stream, i.e.

    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.

  4. def drop(n: Int)(implicit M: Functor[M]): StreamT[M, A]
  5. def dropWhile(p: (A) => Boolean)(implicit m: Functor[M]): StreamT[M, A]
  6. def filter(p: (A) => Boolean)(implicit m: Functor[M]): StreamT[M, A]
  7. def flatMap[B](f: (A) => StreamT[M, B])(implicit m: Functor[M]): StreamT[M, B]
  8. def foldLeft[B](z: => B)(f: (=> B, => A) => B)(implicit M: Monad[M]): M[B]
  9. def foldLeftRec[B](z: B)(f: (B, A) => B)(implicit M: BindRec[M]): M[B]
  10. def foldMap[B](f: (A) => B)(implicit M: Foldable[M], B: Monoid[B]): B
  11. def foldRight[B](z: => B)(f: (=> A, => B) => B)(implicit M: Monad[M]): M[B]
  12. 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.

  13. def foldRightRec[B](z: => B)(f: (=> A, => B) => B)(implicit M: BindRec[M]): M[B]
  14. def foreach(f: (A) => M[Unit])(implicit M: Monad[M]): M[Unit]
  15. def foreachRec(f: (A) => M[Unit])(implicit M: Monad[M], B: BindRec[M]): M[Unit]
  16. def head(implicit M: Monad[M]): M[A]
  17. def headOption(implicit M: Monad[M]): M[Option[A]]
  18. def headOptionRec(implicit M: BindRec[M]): M[Option[A]]
  19. def headRec(implicit M: BindRec[M]): M[A]
  20. def isEmpty(implicit M: Monad[M]): M[Boolean]
  21. def isEmptyRec(implicit M: BindRec[M]): M[Boolean]
  22. def length(implicit m: Monad[M]): M[Int]
  23. def lengthRec(implicit M: BindRec[M]): M[Int]
  24. def map[B](f: (A) => B)(implicit m: Functor[M]): StreamT[M, B]
  25. def mapM[B](f: (A) => M[B])(implicit m: Monad[M]): StreamT[M, B]

    Since

    7.0.1

  26. val step: M[Step[A, StreamT[M, A]]]
  27. def tail(implicit m: Functor[M]): StreamT[M, A]

    Don't use iteratively!

  28. def tailM(implicit M: Monad[M]): M[StreamT[M, A]]
  29. def tailMRec(implicit M: BindRec[M]): M[StreamT[M, A]]
  30. def take(n: Int)(implicit M: Functor[M]): StreamT[M, A]
  31. def takeWhile(p: (A) => Boolean)(implicit m: Functor[M]): StreamT[M, A]
  32. 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 resulting Stream is extracted from the returned M.

  33. 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 resulting Stream is extracted from the returned M.

  34. def trans[N[_]](t: ~>[M, N])(implicit M: Functor[M], N: Functor[N]): StreamT[N, A]
  35. def uncons(implicit M: Monad[M]): M[Option[(A, StreamT[M, A])]]
  36. def unconsRec(implicit M: BindRec[M]): M[Option[(A, StreamT[M, A])]]