Escher in Elm: Picture combinators and recursive fish

Key takeaways
  • 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.

Einar Høst

Sharpen your skills. Explore

Pick your topics of interest below
Large Spinner

Partners

Köld
Partners, Sticker Mule

Best companies

Best companies, Qlik
Best companies, VP Securities
Best companies, Telavox
Best companies, EDP
Best companies, Avensia
Best companies, Citerus
Best companies, Avega Group
Best companies, Handelsebanken
Best companies, Play'n'GO
Best companies, Capgemini
Best companies, Trustly
Best companies, Danskebank
Best companies, Lantmäteriet
Best companies, ÅF