Recursion

object Recursion
class Object
trait Matchable
class Any

Value members

Concrete methods

def adi[F[_], A](alg: F => A, f: (Fix[F] => A) => Fix[F] => A)(ff: Fix[F])(implicit F: Functor[F]): A

See "Abstracting Definitional Interpreters".

See "Abstracting Definitional Interpreters".

def adiM[M[_], F[_], A](alg: (M, F) => A, f: (Fix[F] => M[A]) => Fix[F] => M[A])(ff: Fix[F])(implicit M: Monad[M], F: Traverse[F]): M[A]

See "Abstracting Definitional Interpreters".

See "Abstracting Definitional Interpreters".

def ana[F[_], A](coalg: F => A)(a: A)(implicit F: Functor[F]): Fix[F]
def anaM[M[_], F[_], A](coalg: (M, F) => A)(a: A)(implicit M: Monad[M], F: Traverse[F]): M[Fix[F]]
def apo[F[_], A](coalg: F => A)(a: A)(implicit F: Functor[F]): Fix[F]

ana that can branch / short-circuit

ana that can branch / short-circuit

def cata[F[_], A](alg: F => A)(f: Fix[F])(implicit F: Functor[F]): A
def cataM[M[_], F[_], A](alg: (M, F) => A)(f: Fix[F])(implicit M: Monad[M], F: Traverse[F]): M[A]
def chrono[F[_], A, B](coalg: F => A, alg: F => B)(a: A)(implicit F: Functor[F]): B

hylo of futu into histo

hylo of futu into histo

def coelgot[F[_], A, B](coalg: F => A, elalg: (A, () => F[B]) => B)(a: A)(implicit F: Functor[F]): B

hylo that can short-circuit on reduction

hylo that can short-circuit on reduction

def elgot[F[_], A, B](elcoalg: A => Either[B, F[A]], alg: F => B)(a: A)(implicit F: Functor[F]): B

hylo that can short-circuit on construction

hylo that can short-circuit on construction

def futu[F[_], A](coalg: F => A)(a: A)(implicit F: Functor[F]): Fix[F]

ana that can build multiple levels in a single pass

ana that can build multiple levels in a single pass

def histo[F[_], A](alg: F => A)(f: Fix[F])(implicit F: Functor[F]): A

cata that retains values of all previous (i.e. child) steps

cata that retains values of all previous (i.e. child) steps

def hylo[F[_], A, B](coalg: F => A, alg: F => B)(a: A)(implicit F: Functor[F]): B

ana with immediate cata

ana with immediate cata

def hyloM[M[_], F[_], A, B](coalg: (M, F) => A, alg: (M, F) => B)(a: A)(implicit M: Monad[M], F: Traverse[F]): M[B]
def para[F[_], A](alg: F => A)(f: Fix[F])(implicit F: Functor[F]): A

cata that has access to current subtree (Fix[F]) as well as that subtree's folded result (A)

cata that has access to current subtree (Fix[F]) as well as that subtree's folded result (A)

def postpro[F[_], A](coalg: F => A, pro: FunctionK[F, F])(a: A)(implicit F: Functor[F]): Fix[F]

ana that creates a structure, transforming each new child (i.e. the entire structure as exists at the end of a pass). Top-most structure (i.e. the end result) is not transformed. Inside to outside.

ana that creates a structure, transforming each new child (i.e. the entire structure as exists at the end of a pass). Top-most structure (i.e. the end result) is not transformed. Inside to outside.

def prepro[F[_], A](pre: FunctionK[F, F], alg: F => A)(f: Fix[F])(implicit F: Functor[F]): A

cata that transforms children before folding. Top-most structure (i.e. the input) is not transformed. Outside to inside.

cata that transforms children before folding. Top-most structure (i.e. the input) is not transformed. Outside to inside.