Following on from my introduction to monads in JavaScript, and before I get into how they apply to asynchronous programming, I’d like to take a quick detour to improve the usability of the tools we’ve built up. Recall we have a function for composing functions: var compose = function(f, g) { return function(x) { return f(g(x)) }; }; // sine :: Number -> (Number,String) var sine = function(x) { ret