metamorphisms: ana . cata or understanding folds and unfolds

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

OtherLicense licensed by Martin Erwig
Maintained by Drew Day

Metamorphisms are an approach to structured recursion.

This package is currently a reorganization and slight adaptation of the original code which was written more than a decade ago (in 1999); it is, however quite a direct and clever way to investigate the concepts involved.

The original code and paper can be found here:

This code uses unusual layout (in particular, I use very wide columns and lots of spacing) in hopes that it makes the symmetry of the functions manifest. Any mistakes in the code are almost surely mine, and not the original author's.

Future updates should include:

  • documentation

  • an abstract syntax graph version of the included functions

  • diagrams of involved structures

  • examples demonstrated by doctest

  • switch to hierarchical naming

  • switch to available versions of components (SimpleMap, Heap)

  • a more general license

Depends on 1 package:
Used by 1 package:
comments powered byDisqus