Catamorphisms, or folds, model primitive recursion. cata tears down a fixpoint layer by layer, using an algebra function (or folding function) to process each layer. cata requires a Functor instance for the template type f.
cata :: Functor f => (f a -> a) -> Fix f -> a
cata f = f . fma...