scalaz

Free

sealed abstract class Free[S[+_], +A] extends AnyRef

A free operational monad for some functor S. Binding is done using the heap instead of the stack, allowing tail-call elimination.

Source
Free.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Free
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Free()(implicit S: Functor[S])

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def >>=[B](f: (A) ⇒ Free[S, B]): Free[S, B]

    Alias for flatMap

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. final def bounce[AA >: A](f: (S[Free[S, A]]) ⇒ Free[S, AA]): Free[S, AA]

    Runs a single step, using a function that extracts the resumption from its suspension functor.

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def collect[B, C >: A](implicit ev: <~<[Free[S, C], Free.Source[B, C]]): (Vector[B], C)

    Runs a Source all the way to the end, tail-recursively, collecting the produced values.

  11. def drain[E, B, C >: A](source: Free.Source[E, B])(implicit ev: <~<[Free[S, C], Free.Sink[E, C]]): (C, B)

    Feed the given source to this Sink.

  12. def drive[E, B, C >: A](sink: Free.Sink[Option[E], B])(implicit ev: <~<[Free[S, C], Free.Source[E, C]]): (C, B)

    Drive this Source with the given Sink.

  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def feed[E, C >: A](ss: Stream[E])(implicit ev: <~<[Free[S, C], Free.Sink[E, C]]): C

    Feed the given stream to this Source.

  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def flatMap[B](f: (A) ⇒ Free[S, B]): Free[S, B]

    Binds the given continuation to the result of this computation.

    Binds the given continuation to the result of this computation. All left-associated binds are reassociated to the right.

  18. final def foldRun[B, AA >: A](b: B)(f: (B, S[Free[S, AA]]) ⇒ (B, Free[S, AA])): (B, AA)

    Runs to completion, allowing the resumption function to thread an arbitrary state of type B.

  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. final def go[AA >: A](f: (S[Free[S, AA]]) ⇒ Free[S, AA]): AA

    Runs to completion, using a function that extracts the resumption from its suspension functor.

  21. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. final def map[B](f: (A) ⇒ B): Free[S, B]

  24. final def mapFirstSuspension(f: ~>[S, S]): Free[S, A]

    Modifies the first suspension with the given natural transformation.

  25. final def mapSuspension[T[+_]](f: ~>[S, T])(implicit arg0: Functor[T]): Free[T, A]

    Changes the suspension functor by the given natural transformation.

  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. final def resume: \/[S[Free[S, A]], A]

    Evaluates a single layer of the free monad.

    Evaluates a single layer of the free monad.

    Annotations
    @tailrec()
  30. def run[B >: A](implicit ev: <~<[Free[S, B], Free.Trampoline[B]]): B

    Runs a trampoline all the way to the end, tail-recursively.

  31. final def runM[M[_], AA >: A](f: (S[Free[S, AA]]) ⇒ M[Free[S, AA]])(implicit arg0: Monad[M]): M[AA]

    Since

    7.0.1

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. def toString(): String

    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def zap[G[+_], B](fs: Cofree[G, (A) ⇒ B])(implicit G: Functor[G], d: Zap[S, G]): B

    Applies a function in a comonad to the corresponding value in this monad, annihilating both.

  38. final def zapWith[G[+_], B, C](bs: Cofree[G, B])(f: (A, B) ⇒ C)(implicit G: Functor[G], d: Zap[S, G]): C

    Applies a function f to a value in this monad and a corresponding value in the dual comonad, annihilating both.

  39. def zipWith[B, C](tb: Free[S, B], f: (A, B) ⇒ C): Free[S, C]

    Interleave this computation with another, combining the results with the given function.

Inherited from AnyRef

Inherited from Any

Ungrouped