package free
- Alphabetic
- By Inheritance
- free
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
case class
Cofree[S[_], A](head: A, tail: Eval[S[Cofree[S, A]]]) extends Product with Serializable
A free comonad for some branching functor
S
.A free comonad for some branching functor
S
. Branching is done lazily using Eval. A tree with data at the branches, as opposed to Free which is a tree with data at the leaves. Not an instruction set functor made into a program monad as in Free, but an instruction set's outputs as a functor made into a tree of the possible worlds reachable using the instruction set.This Scala implementation of
Cofree
and its usages are derived from Scalaz's Cofree, originally written by Rúnar Bjarnason. -
sealed abstract
class
ContravariantCoyoneda[F[_], A] extends Serializable
The free contravariant functor on
F
.The free contravariant functor on
F
. This is isomorphic toF
as long asF
itself is a contravariant functor. The function fromF[A]
toContravariantCoyoneda[F,A]
exists even whenF
is not a contravariant functor. Implemented using a List of functions for stack-safety. -
sealed abstract
class
Coyoneda[F[_], A] extends Serializable
The dual view of the Yoneda lemma.
The dual view of the Yoneda lemma. The free functor on
F
. This is isomorphic toF
as long asF
itself is a functor. The function fromF[A]
toCoyoneda[F,A]
exists even whenF
is not a functor. Implemented using a List of functions for stack-safety. -
sealed abstract
class
Free[S[_], A] extends Product with Serializable
A free operational monad for some functor
S
.A free operational monad for some functor
S
. Binding is done using the heap instead of the stack, allowing tail-call elimination. -
sealed abstract
class
FreeApplicative[F[_], A] extends Product with Serializable
Applicative Functor for Free, implementation inspired by https://github.com/safareli/free/pull/31/
-
sealed abstract
class
FreeInvariantMonoidal[F[_], A] extends Product with Serializable
Invariant Monoidal for Free
-
sealed abstract
class
FreeT[S[_], M[_], A] extends Product with Serializable
FreeT is a monad transformer for Free monads over a Functor S
FreeT is a monad transformer for Free monads over a Functor S
Stack safety for
Free
andFreeT
is based on the paper Stack Safety for Free by Phil FreemanThis Scala implementation of
FreeT
and its usages are derived from Scalaz's FreeT, originally written by Brian McKenna. -
type
Trampoline[A] = Free[Function0, A]
Alias for the free monad over the
Function0
functor. -
abstract
class
Yoneda[F[_], A] extends Serializable
The cofree functor for
F
.The cofree functor for
F
. The Yoneda lemma says thatYoneda[F,A]
is isomorphic toF[A]
for any functorF
. The function fromYoneda[F, A]
toF[A]
exists even when we have forgotten thatF
is a functor. Can be seen as a partially appliedmap
for the functorF
.
Value Members
- object Cofree extends CofreeInstances with Serializable
- object ContravariantCoyoneda extends Serializable
- object Coyoneda extends Serializable
- object Free extends FreeInstances with Serializable
- object FreeApplicative extends Serializable
- object FreeInvariantMonoidal extends Serializable
- object FreeT extends FreeTInstances with Serializable
- object Trampoline extends TrampolineFunctions
- object Yoneda extends Serializable