The recursive typeclass abstracts out the ability to recursively fold a structure. See Intro to Recursion Schemes for an introduction to how it works.
Given a Functor
F, creates a Coalgebra which expands an
F into a
fun <F> Functor<F>.project(): Coalgebra<F, Kind<T, F>>
The implementation for project; takes a
Kind<T, F> and returns a
Kind<F, Kind<T, F>>.
fun <F> Functor<F>.projectT(tf: Kind<T, F>): Kind<F, Kind<T, F>>
Fold generalized over any Recursive
T for any Functor
F (wrapped in an
fun <F, A> Functor<F>.cata(tf: Kind<T, F>, alg: Algebra<F, Eval<A>>): A
RecursiveLaws in the form of test cases for internal verification of
lawful instances and third party apps creating their own
Arrow provides three datatypes that are instances of
Recursive, each modeling a
different way of defining recursion.
|arrow.recursion.data||Fix, Mu, Nu|