Burritos have side effects?
Many impure functions take place in Taco Bell bathrooms
A "side effect" is generally the behaviour that can be modeled by a Monad under chaining (join), and is not necessarily IO (although IO is a Monad). For a burrito, the side effect of join is the union of burrito contents.
Imagine eating a burrito bite by bite as you're performing a pure computation in your head. This would be captured as `Burrito Result` monad, where `Result` is the value that you're computing, and `Burrito` is the partially consumed burrito at the end of the computation. By representing it as a monad, you can pass said partially consumed burrito to someone else for them to compute while continuing to eat it, or you can delegate your computation to other people, passing burrito from one to the other. ~
So, yes, I suppose.
Re:Monads are like burritos (2009)
by chuckadams on Monday June 03, 2024 @11:14AM
(#40563460)
A Human Centipede is a Monoid in the category of digestive tracts.
Beyond that, they're a pretty general and reusable way of looking at data structures that nest.