4 ms·
I've occasionally heard that "monads" are an innovation that allows one to handle side effects, such as input and output, in purely functional programming langu
by doodpants 4y ago
I've occasionally heard that "monads" are an innovation that allows one to handle side effects, such as input and output, in purely functional programming languages such as Haskell. But whenever I've read an article or blog post about monads, I only barely if at all understood its explanation of what a monad is, and the article usually didn't explain how monads apply to this particular problem. So, just now, when faced with Galactica's input box, I decided to ask it this very question, to see if it could finally grant me the enlightenment I've sought for so long:
Question: How do monads solve the problem of allowing side effects in a purely functional programming language?
Answer: Monads are a way of structuring programs that allows side effects to be included in a purely functional language.
I'd call that success! ;-)
- sitkack 4y agoI thought monads allowed alligators to eat bananas without changing the relative number of either. Can you ask it to make a Monad Analogy Explainer post?
- sitkack 4y agoQuestion: How do bananas and alligators relate to monads? Answer: Bananas and alligators are monads.
- johnday 4y agoIf you want to find out what monads are most like (and least like) you can use the website https://monadsare.fun/ https://monadsare.fun/. You can also add your own opinions.
- gpderetta 4y agoAt least you didn't get the endofunctor explanation.