3 ms·
I've read a ton of such blog posts recently in exploring this subject - seems like the tradition is as soon as you believe you understand the monad you must imm
by stevetrewick 11y ago
I've read a ton of such blog posts recently in exploring this subject - seems like the tradition is as soon as you believe you understand the monad you must immediately write a blog post explaining it and pointing out why everyone else's metaphor is too complicated.
This one is kind of nice in its succinctness, but that ends up meaning it doesn't explain why I should care or what I would do with my monad once I have grokked it.
I've yet to write my personal "how I grokked my monad and why everyone else is wrong" post, but I suspect that there's probably a sweet spot somewhere between 'monad is simply a monoid in the category of endofunctors' and a 'plain English' translation of the monad laws with no context. Preferably with an explanation of why I would want or need such a thing up front. Preferably without Haskell notation.
That said, such an intro would probably still be pretty hard going, some things are just hard, or at least difficult to understand without context. I said I've been reading lots of these recently, actually I've been reading them for a couple of years, but I've only been understanding them recently because I've bumped into a problem domain for which the solution I was groping for in the dark turned out to be a monad.
Swift wise, I found the following to be very enlightening
http://alisoftware.github.io/swift/2015/10/17/lets-talk-about-monads/ http://alisoftware.github.io/swift/2015/10/17/lets-talk-abou...
http://alisoftware.github.io/swift/async/error/2016/02/06/async-errors/ http://alisoftware.github.io/swift/async/error/2016/02/06/as...
http://khanlou.com/2015/09/what-the-heck-is-a-monad/ http://khanlou.com/2015/09/what-the-heck-is-a-monad/
http://www.javiersoto.me/post/106875422394 http://www.javiersoto.me/post/106875422394
http://chris.eidhof.nl/post/json-parsing-in-swift/ http://chris.eidhof.nl/post/json-parsing-in-swift/