3 ms·
Re: monad For my part, the most confusing thing was that I was trying to understand monads by looking at both haskell and category theory. However, a monad in
by epgui 3y ago
Re: monad
For my part, the most confusing thing was that I was trying to understand monads by looking at both haskell and category theory.
However, a monad in computer code is a different beast than a monad in category theory (I believe this may be true in every
programming language currently, but if you have a counter-example I'd love to hear about it). They look vaguely similar, but aren’t the same thing. Nobody told me this, but it greatly simplified comprehension once I had that epiphany.
A lot of monad explanations just confuse monads and functors too (functors are your burritos / wrapper data types; and functors should probably be understood before monads). IMO seeing monads as being primarily about function composition, kind of like the functions `compose` or `pipe` or `thread_first` or `thread_last`… but in a context that makes use of functors, is the best way to really see the core simplicity of the idea.