A Burrito Is a Monad
William Cotton explores burritos as monads, defining types for meat and ingredients to create a burrito type. Functions manipulate burrito contents, resulting in a final playful yet informative exploration of functional programming.
Read original articleWilliam Cotton discusses the concept of a burrito as a monad on his website. He defines types for meat and ingredients, creating a burrito type. The code snippet provided showcases functions for manipulating burrito ingredients, such as adding meat, adding ingredients, and customizing the burrito contents. The final burrito created includes chicken, rice, beans, pico de gallo, salsa, guacamole, and sour cream while omitting cheese. The post humorously concludes with the statement "It's got Some Chicken. I'll see myself out..." This playful exploration of functional programming concepts through the lens of a burrito metaphor adds a light-hearted touch to the technical discussion.
Related
My experience crafting an interpreter with Rust (2021)
Manuel Cerón details creating an interpreter with Rust, transitioning from Clojure. Leveraging Rust's safety features, he faced challenges with closures and classes, optimizing code for performance while balancing safety.
Cognate: Readable and concise concatenative programming
Cognate is a concise, readable concatenative programming language emphasizing simplicity and flexibility. It supports operators as functions, stack evaluation, control flow statements, list manipulation, recursion, and mutable variables through boxes.
Flambda2 Ep. 2: Loopifying Tail-Recursive Functions
Flambda2's Episode 2 explores Loopify, an optimization algorithm for tail-recursive functions in OCaml. It transforms recursion into loops, enhancing memory efficiency without compromising functional programming principles.
Deriving Dependently-Typed OOP from First Principles
The paper delves into the expression problem in programming, comparing extensibility in functional and object-oriented paradigms. It introduces dependently-typed object-oriented programming, emphasizing duality and showcasing transformations. Additional appendices are included for OOPSLA 2024.
Microfeatures I love in blogs and personal websites
The article explores microfeatures for blogs and websites inspired by programming concepts. It highlights sidenotes, navigation tools, progress indicators, and interactive elements to improve user experience subtly. Examples demonstrate practical implementations.
I guess this is Haskel code, though I never touched this language.
Related
My experience crafting an interpreter with Rust (2021)
Manuel Cerón details creating an interpreter with Rust, transitioning from Clojure. Leveraging Rust's safety features, he faced challenges with closures and classes, optimizing code for performance while balancing safety.
Cognate: Readable and concise concatenative programming
Cognate is a concise, readable concatenative programming language emphasizing simplicity and flexibility. It supports operators as functions, stack evaluation, control flow statements, list manipulation, recursion, and mutable variables through boxes.
Flambda2 Ep. 2: Loopifying Tail-Recursive Functions
Flambda2's Episode 2 explores Loopify, an optimization algorithm for tail-recursive functions in OCaml. It transforms recursion into loops, enhancing memory efficiency without compromising functional programming principles.
Deriving Dependently-Typed OOP from First Principles
The paper delves into the expression problem in programming, comparing extensibility in functional and object-oriented paradigms. It introduces dependently-typed object-oriented programming, emphasizing duality and showcasing transformations. Additional appendices are included for OOPSLA 2024.
Microfeatures I love in blogs and personal websites
The article explores microfeatures for blogs and websites inspired by programming concepts. It highlights sidenotes, navigation tools, progress indicators, and interactive elements to improve user experience subtly. Examples demonstrate practical implementations.