The monad tutorial fallacy is the claim that it is impossible to convey the meaning of "computational context" except via giving the monad axioms, or via studying the usual examples.
-
-
Show this thread
-
But grokking the classical examples involves the extra labor understanding that unusual computational contexts still can be simulated using pure functions.
Show this thread -
Because Continuation is the Mother of all Monads, it is better to start with that, and abstract from there, instead of using List.
Show this thread
End of conversation
New conversation -
-
-
Wanna teach me monads? I’ve stared at them before, but the understanding slides right off my brain, so far
-
Sure, what's your background? Does the "convenient notation" part in the gif make sense to you? https://www.bram.us/wordpress/wp-content/uploads/2017/05/js-callbacks-promises-asyncawait.gif …
-
I’ve see plenty of javascript and the example makes sense. Background is a good bit of cs and software, mostly dynamic languages but some flow/typescript and typed languages here and there
-
Great. But using >>= in Haskell is still more mysterious than using .then in JS, or what do you feel unsure about?
-
What I don't get is which part the word monad refers to
-
Maybe it is difficult to see it as a thing because it is more like a design pattern, except fully incarnated (into a type constructer, two generic functions and three laws). The monad design pattern is about sequencing computations that exist in some computational context.
-
Probably need to meditate on that a bit. What would definitions of return and >>= look like for a js Promise? Is ‘then’ ‘>>=‘?
-
Yes. For return: return = x => Promise.resolve(x);
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.