News for hackers. Stuff that matters.
Re:A Gentle Intro to Monads … Maybe? by GeneralMayhem on Friday January 17, 2014 @12:41PM (#7077157)
The point where a JS developer is most likely to run into monads is with asynchronous code. We call it "callback hell," and the reason it exists is because async callbacks, like monads, can't be easily "escaped" - everything done with a result must be used in the same monadic (asynchronous) context. Once you enter a callback-based function, you usually can't simply return from it and go back to standard sequentially-executed code.

It takes a bit more work to formally show that continuations follow the monad laws, but that's as much as it took for me to begin to get the concept.

There are no comments on this comment yet.