An unfold that can short-circuit certain sections.
An unfold that can short-circuit certain sections.
Attribute a tree via an algebra starting from the root.
Attribute a tree via an algebra starting from the root.
Kleisli variant of attributeTopDown
Kleisli variant of attributeTopDown
A Kleisli catamorphism.
A Kleisli catamorphism.
Roughly a default impl of embed
, given a matryoshka.Recursive
instance and an overridden ana
.
Roughly a default impl of embed
, given a matryoshka.Recursive
instance and an overridden ana
.
A catamorphism generalized with a comonad outside the functor.
A catamorphism generalized with a comonad outside the functor.
An unfold that can handle sections with a secondary unfold.
An unfold that can handle sections with a secondary unfold.
A catamorphism generalized with a comonad inside the functor.
A catamorphism generalized with a comonad inside the functor.
Roughly a default impl of project
, given a matryoshka.Corecursive
instance and an overridden cata
.
Roughly a default impl of project
, given a matryoshka.Corecursive
instance and an overridden cata
.
Mutually-recursive fold.
Mutually-recursive fold.
Combines two functors that may fail to merge, also providing access to the inputs at each level.
Combines two functors that may fail to merge, also providing access to the inputs at each level. This is akin to an Elgot, not generalized, fold.
This behaves like matryoshka.Corecursive.elgotApo, but it’s harder to
see from the types that in the disjunction,
-\/ is the final result for
this node, while
\/- means to keep processing the children.
This behaves like matryoshka.Corecursive.elgotApo, but it’s harder to
see from the types that in the disjunction,
-\/ is the final result for
this node, while
\/- means to keep processing the children.
This behaves like matryoshka.Recursive.elgotPara, but it’s harder to
see from the types that in the tuple,
_2 is the result so far and
_1
is the original structure.
This behaves like matryoshka.Recursive.elgotPara, but it’s harder to
see from the types that in the tuple,
_2 is the result so far and
_1
is the original structure.
A type that is both Recursive and Corecursive.
NB: Do not define instances of this or use it as a constraint until issue #44 is resolved. Define an instance of BirecursiveT if possible, otherwise define separate Recursive and Corecursive instances.