Functional programming uses a lot of recursion and pattern matching to transform inductive data, but sometimes our functions are mostly plumbing data around which makes it hard to understand what the important part of the transformation is. We’ll look at some techniques that help with these patterns, and how they can be applied to lists and different kinds of trees.
- Functional Programming with Bananas, Lenses, Envelopes, and Barbed Wire: https://maartenfokkinga.github.io/utwente/mmf91m.pdf
- Scrap Your Boilerplate: A Practical Design Pattern for Generic Programming: https://www.microsoft.com/en-us/research/wp-content/uploads/2003/01/hmap.pdf
- The implementation of these combinators in Erlang: https://github.com/robotlolita/generique