scalaz

Cofree

case class Cofree[S[+_], +A](head: A, tail: S[Cofree[S, A]], S: Functor[S]) extends Product with Serializable

A cofree comonad for some functor S, i.e. an S-branching stream.

Source
Cofree.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Cofree
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Cofree(head: A, tail: S[Cofree[S, A]])(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: (Cofree[S, A]) ⇒ B): Cofree[S, B]

    Alias for extend

  7. final def applyCofree[B](f: (A) ⇒ B, g: (Cofree[S, A]) ⇒ Cofree[S, B]): Cofree[S, B]

    Applies f to the head and g through the tail.

  8. final def applyTail[B](b: B, g: (Cofree[S, A]) ⇒ Cofree[S, B]): Cofree[S, B]

    Replaces the head with b and applies g through the tail.

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def canEqual(arg0: Any): Boolean

    Definition Classes
    Cofree → Equals
  11. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. final def copure: A

    Alias for head, for compatibility with Scalaz 6

  13. final def duplicate: Cofree[S, Cofree[S, A]]

    Redecorates the structure with values representing entire substructures.

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

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

    Definition Classes
    Cofree → Equals → AnyRef → Any
  16. final def extend[B](f: (Cofree[S, A]) ⇒ B): Cofree[S, B]

    Redecorates this structure with a computation whose context is the entire structure under that value.

  17. final def extract: A

    Alias for head, for compatibility with Scalaz 6

  18. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  19. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    Cofree → AnyRef → Any
  21. val head: A

  22. final def inject[B](b: B): Cofree[S, B]

    Injects a constant value into this structure.

  23. final def isInstanceOf[T0]: Boolean

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

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

    Changes the branching functor by the given natural transformation.

  26. final def mapFirstBranching(f: ~>[S, S]): Cofree[S, A]

    Modifies the first branching with the given natural transformation.

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

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

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

    Definition Classes
    AnyRef
  30. final def out: S[Cofree[S, A]]

    Alias for tail, for compatibility with Scalaz 6

  31. def productArity: Int

    Definition Classes
    Cofree → Product
  32. def productElement(arg0: Int): Any

    Definition Classes
    Cofree → Product
  33. def productIterator: Iterator[Any]

    Definition Classes
    Product
  34. def productPrefix: String

    Definition Classes
    Cofree → Product
  35. def scanr[B](g: (A, S[Cofree[S, B]]) ⇒ B): Cofree[S, B]

    Folds over this cofree structure, returning all the intermediate values in a new structure.

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

    Definition Classes
    AnyRef
  37. val tail: S[Cofree[S, A]]

  38. final def toPair: (A, S[Cofree[S, A]])

    Returns the components of this structure in a tuple.

  39. def toString(): String

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

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

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

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

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

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

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

Deprecated Value Members

  1. def productElements: Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) use productIterator instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any