The catamorphism (generalized fold) for the F-algebra ϕ
with carrier object B
, also denoted (| ϕ |)
.
The catamorphism (generalized fold) for the F-algebra ϕ
with carrier object B
, also denoted (| ϕ |)
.
(| ϕ |)
recursively computes a result of type B
from this
instance of µ[F]
.
carrier object of ϕ
and result type of the catamorphism
F-algebra to apply to the partial results available for the children of this instance
the result of applying (| ϕ |)
to this instance of µ[F]
The paramorphism (generalized catamorphism) for the morphism ψ
with carrier object B
, also denoted <[ ψ ]>
.
The paramorphism (generalized catamorphism) for the morphism ψ
with carrier object B
, also denoted <[ ψ ]>
.
This recursively computes a result of type B
from this
instance of Cofree[F, A]
by applying ψ
to the head and tail
of this instance and the partial results available for the children.
Note that this is the only place with explicit recursion in this
example.
carrier object of ψ
and result type of the paramorphism
morphism to apply to the partial results available for the children of this instance
the result of applying the paramorphism to this instance of
Cofree[F, A]
Wraps a value
self
and provides catamorphism and related recursion patterns for injection into initial F-algebras based onµ
.endofunctor of the category Scala types for this structure (type constructor of arity 1 with a
map
function that obeys certain laws).