Convenience to specify the base constructor "shape" (such as Fix
or Cofree[?[_], Int]
) for recursion.
Convenience to specify the base constructor "shape" (such as Fix
or Cofree[?[_], Int]
) for recursion.
This helps to guide Scala's type inference so all of the type parameters for the various recursion scheme methods don't have to be provided.
Build a hylomorphism by recursively unfolding with coalgebra
and
refolding with algebra
.
Build a hylomorphism by recursively unfolding with coalgebra
and
refolding with algebra
.
hylo A ---------------> B | ^ co- | | algebra | | algebra | | v | F[A] ------------> F[B] map hylo
Build a monadic hylomorphism
Build a monadic hylomorphism
hyloM A ---------------> M[B] | ^ co- | | algebraM | | flatMap f | | v | M[F[A]] ---------> M[F[M[B]]] map hyloM with f: F[M[B]] -----> M[F[B]] ----------> M[B] sequence flatMap algebraM
A petting zoo for wild and exotic animals we keep separate from the regulars in scheme.
A petting zoo for wild and exotic animals we keep separate from the regulars in scheme. For their safety and yours.