News for hackers. Stuff that matters.
Re:Monads are like burritos (2009) by mmaniac on Sunday June 02, 2024 @03:22PM (#40556586)
Haskell started using them because it allows a pure language to express side effects.

Beyond that, they're a pretty general and reusable way of looking at data structures that nest.

Re:Monads are like burritos (2009) by koolala on Sunday June 02, 2024 @03:23PM (#40556595)
Burritos have side effects?
Re:Monads are like burritos (2009) by Y_Y on Sunday June 02, 2024 @03:35PM (#40556683)
Many impure functions take place in Taco Bell bathrooms
Re:Monads are like burritos (2009) by juunpp on Sunday June 02, 2024 @03:36PM (#40556685)
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.
Re:Monads are like burritos (2009) by int_19h on Sunday June 02, 2024 @09:02PM (#40558399)
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.
Re:Monads are like burritos (2009) by koolala on Tuesday June 04, 2024 @08:34AM (#40573849)
Digital Spreadsheets lets you do this from multiple angles.