Escher in Elm: Picture combinators and recursive fish
- Learn to love functional concepts like composition and recursion.
- Appreciate the power and elegance of abstractions that compose.
- Become friends with Elm, a functional programming language for the browser.
This is a live coding session based on a classic 1982 paper by Peter Henderson. Although the paper is old, the ideas in it remain fresh, practical and relevant to software development today. It demonstrates the power and beauty of functional abstraction and composition. Following in Henderson's footsteps, I will show the decomposition and reconstruction of Escher's woodcutting "Square Limit", a beautiful recursive tessellation of interleaving fish, using functional programming. To do so, I will define a small set of functions that operate on pictures - transforming them and composing them into more complex pictures. With these functions implemented, I will create a replica of Escher's Square Limit as an SVG. I will use Elm as the implementation language, because Elm is simple, friendly and runs in the browser.