Re:A Burrito Is a Monad
by pshirshov on Monday September 30, 2024 @12:33PM
(#41699102)
Not this shit again.
How much can be said about a trivial algebraic concept with 2 laws and 3 operations?
[ Parent
| on HN ]
This is my favourite comment on YCombinator and I had to reply to get a reminder.
I guess you meant 2 operations and 3 laws?
See? You knew it :3
I'm gettin it now! :)
Because grokking monads at some deep philosophical level is like "compiling the kernel" or "editing XF86Config": some mythically arcane thing you have to do that "only PhDs can understand" and hence is a good enough reason to avoid the thing it's a part of.
Monads are a design pattern, albeit not one in the Gang of Four tradition, and it's concrete enough to be expressible in Haskell's type system. Learn the operations and laws, study some code involving List or IO to see how it's used, and get to work. No big deal.
They aren't a design pattern, they are an abstract algebraic concept with two trivial operations (pure/flatmap) and three trivial laws (right identity, left identity, associativity).
Yes, Monads are about as difficult as compiling a kernel (run `make`).
"Learning is amazing, you can literally change the structure of your brain to better adapt to the universe!"
"Nah there's nothing to learning, you don't know something, badabing, you know something, big deal."