This guide will use JavaScript instead of a pure functional programming language (e.g. Haskell) to make things more approachable for developers accustomed to imperative languages. It will, however, assume you have basic knowledge of functional programming, including currying and lambdas.
This is part of a three part examining the underling mathematics and mechanics of Asynchronous programming with javascript When i wanted to make sense of the continuations , i started from the basics…
A pragmatic new design for high-level abstractions Monads (and, more generally, constructs known as “higher kinded types”) are a tool for high-level abstraction in programming languages1. Historically, there has been a lot of debate inside (and outside) the Rust community about whether monads would be a useful abstraction to have in the language. I’m not concerned with that here. You see, there’s a problem with talking about whether monads would be useful or not, and it’s this: there are a large number of design challenges to overcome to have any hope of implementing them at all — to the best of my knowledge, there currently exists no realistic (that is, practical) design for monads in Rust. In fact, there are so many obstacles that some people express doubt that it’s even possible. Strictly speaking, they’re a lot more than that, but we’re only interested in the programming angle here. ↩
Dealing with stateful computations can be a real pain when you are writing purely functional JavaScript code. It can result in things like undesired variable declarations, and if you are not using…
Google Tech Talk January 15, 2013 (more info below) Presented by Douglas Crockford ABSTRACT The wonders of monads are finally revealed without resorting to C...