• Burrito Monads, Arrow Kitchens, and Freyd Category Recipes Posted by Tom Leinster Guest post by Khyathi Komalan and Andrew Krenz From Lawvere’s Hegelian taco to Baez’s layer cake analogy to Eugenia Cheng’s How to Bake Pi, categorists have cultivated a rich tradition of culinary metaphors and similes. • A well-known example in the world of computation is Mark Dominus’s “monads are like burritos” - where a tortilla (computational context) wraps diverse ingredients (values) to create a cohesive entity (effectful value) whose burrito structure is maintained as the meal moves down the assembly line (undergoes computations). • Monads, like burritos, come in many different varieties. • In computer science monads serve to streamline computational patterns such as exception handling and context management. • We illustrate these two examples by analogy. • Imagine you work at a burrito truck.

Article Summaries:

  • Tom Leinster’s guest post, co‑authored by Khyathi Komalan and Andrew Krenz, explores the use of culinary metaphors to explain monads in functional programming. The article highlights the “burrito” analogy for the Maybe monad, illustrating how it handles exceptions by propagating a “Nothing” value. It then discusses the Either monad as a generalization that can carry error messages, and introduces the Reader monad to model computations that depend on a global read‑only state. Throughout, the post provides Haskell code snippets and diagrammatic explanations to clarify how these monads fit into the broader category‑theoretic framework.

Sources: