Generic Accumulations: Battery-powered Bananas

For those who do not think that "catamorphism" sounds scary, Generic Accumulations paper presents a new flavor of fold: fold with accumulators (afold).

You might be acquainted with its cousin - pfold, or fold with parameters. Both come from the family of comonadic fold.

A homepage of Alberto Pardo contains more information on them.

PS: if you are new to fold or bananas/lenses, LtU papers page has a couple of introductory links.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

This series of papers are quite nice...

...because they do a good job of presenting the categorical proofs. They are ideal to study if you know what diagrams and functors and (co)products are, but don't know how to actually put them together to get a proof out.

Recursion Schemes from Comonads

Didn't the above paper generalize folds to cover these (and more) cases? Note that you can also unsurprisingly get corecursion schemes from monads and that was done first. It's actually not too hard too see how to put the pieces together before reading the paper.