Recursion Schemes

Awesome Recursion Schemes Awesome

A curation of useful resources for learning about and using recursion schemes.

Recursion schemes are simple, composable combinators, that automate the process of traversing and recursing through nested data structures.

Introductions

  • Awesome Recursion Schemes - A curation of useful resources for learning about and using recursion schemes.
  • Practical Recursion Schemes - Introduction to pattern functors, fix points, anamorphisms, catamorphisms, paramorphisms and hylomorphisms, requiring very little prior knowledge.
  • An Introduction to Recursion Schemes - Three-part series in which you discover recursion schemes from scratch and implement a small subset of Edward Kmett's library.
  • Understanding Algebras - Bartosz Milewski explains F-algebras and shows how to use them in the context of catamorphisms.
  • Recursion Schemes in JavaScript and Flow - Series introducing recursion schemes and related concepts in JavaScript, aimed at developers with a minimal functional programming background.

Articles

Hylomorphisms in the Wild

Articles by Bartosz Milewski about solving small, practical problems by applying a hylomorphism.

Papers

Presentations

Cheat Sheets

Podcasts

Implementations

  • recursion-schemes for Haskell - The canonical implementation by Edward Kmett.
  • Matryoshka for Scala using Scalaz - Generalized folds, unfolds, and traversals for fixed point data structures.
  • andyscott/droste for Scala using Cats - Generalized folds, unfolds, and traversals for fixed point data structures.
  • recursion_schemes for Idris, based off Edward Kmett's Haskell library.
  • purescript-matryoshka for PureScript - Work-in-process port of matryoshka.
  • recursion for ATS - Demonstration of recursion schemes in ATS.
  • dada for Dhall - a library for recursion schemes in Dhall.
  • static-land-recursion-schemes for JavaScript/Flow - Schemes for data structures written in the style of flow-static-land.
  • Katalyst for Kotlin - a re-envisioning based off Matryoshka using lightweight higher kinded polymorphism.

License

This content is licensed under CC0.