sealed abstract class FreeAp[F[_], A] extends AnyRef
Free applicative functors. Less expressive than free monads, but more flexible to inspect and interpret.
- Source
- FreeAp.scala
- Alphabetic
- By Inheritance
- FreeAp
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def analyze[M](f: ~>[F, [α]M])(implicit arg0: Monoid[M]): M
Performs a monoidal analysis over this free program.
Performs a monoidal analysis over this free program. Maps the effects in
F
to values in the monoidM
, discarding the values of those effects. Example:def count[F[_],B](p: FreeAp[F,B]): Int = p.analyze(new (F ~> λ[α => Int]) { def apply[A](a: F[A]) = 1 })
- def ap[B](f: FreeAp[F, (A) => B]): FreeAp[F, B]
Idiomatic function application
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def foldMap[G[_]](f: ~>[F, G])(implicit arg0: Applicative[G]): G[A]
The canonical natural transformation that interprets this free program by giving it the semantics of the applicative functor
G
.The canonical natural transformation that interprets this free program by giving it the semantics of the applicative functor
G
. Not tail-recursive unlessG
is a free monad. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hoist[G[_]](f: ~>[F, G]): FreeAp[G, A]
The natural transformation from
FreeAp[F,_]
toFreeAp[G,_]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[B](f: (A) => B): FreeAp[F, B]
Append a function to the end of this program
- def monadic: Free[F, A]
Embeds this program in the free monad on
F
. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def para[B](pure: (A) => B, ap: ~>[[α](F[α], FreeAp[F, (α) => A]), [α]B]): B
Provides access to the first instruction of this program, if present
- def retract(implicit F: Applicative[F]): F[A]
Interprets this free
F
program using the semantics of theApplicative
instance forF
. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()