Attribute a tree via an algebra starting from the root.
Kleisli variant of attributeTopDown
A Kleisli catamorphism.
A catamorphism generalized with a comonad outside 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
.
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.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.
Folds for recursive data types.