"Can unfamiliar pattern from world of statically typed functional languages improve JavaScript world? For sure YES! The elastic nature of JavaScript can handle great ideas from many alien worlds. With a little help of modern tools like monet.js and TypeScript we can achieve awesomely descriptive aesthetics of our code and drop some imperative bloat."
On 19 march 2016 Kuba Strojewski from Evojam gave a speech about monads on meet.js summit JavaScript Conference. Here's his slide deck.
20. var pepperInABowl = getBowlOf('pepper', 'red');
var pepper = pepperInABowl.get();
var slicedPepperInABowl = slice(pepper);
var tomatoInABowl = getBowlOf('tomato');
var tomato = tomatoInABowl.get();
var slicedTomatoInABowl = slice(tomato);
var slicedPepper = slicedPepperInABowl.get();
var slicedTomato = slicedTomatoInABowl.get();
var mixInABowl = mix(slicedPepper, slicedTomato);
26. var pepperInABowl = getBowlOf('pepper');
var pepper = pepperInABowl.get();
var slicedPepperInABowl = slice(pepper);
var tomatoInABowl = getBowlOf('tomato');
var tomato = tomatoInABowl.get();
var slicedTomatoInABowl = slice(tomato);
var slicedPepper = slicedPepperInABowl.get();
var slicedTomato = slicedTomatoInABowl.get();
var mixInABowl = mix(slicedPepper, slicedTomato);
27. var pepperInABowl = getBowlOf('pepper');
var pepper = pepperInABowl.get();
var slicedPepperInABowl = slice(pepper);
var tomatoInABowl = getBowlOf('tomato');
var tomato = tomatoInABowl.get();
var slicedTomatoInABowl = slice(tomato);
var slicedPepper = slicedPepperInABowl.get();
var slicedTomato = slicedTomatoInABowl.get();
var mixInABowl = mix(slicedPepper, slicedTomato);
28. var pepperInABowl = getBowlOf('pepper');
var pepper = pepperInABowl.get();
var slicedPepperInABowl = slice(pepper);
var tomatoInABowl = getBowlOf('tomato');
var tomato = tomatoInABowl.get();
var slicedTomatoInABowl = slice(tomato);
var slicedPepper = slicedPepperInABowl.get();
var slicedTomato = slicedTomatoInABowl.get();
var mixInABowl = mix(slicedPepper, slicedTomato);
29. var pepperInABowl = getBowlOf('pepper');
var pepper = pepperInABowl.get();
var slicedPepperInABowl = slice(pepper);
var tomatoInABowl = getBowlOf('tomato');
var tomato = tomatoInABowl.get();
var slicedTomatoInABowl = slice(tomato);
var slicedPepper = slicedPepperInABowl.get();
var slicedTomato = slicedTomatoInABowl.get();
var mixInABowl = mix(slicedPepper, slicedTomato);
33. var pepperInABowl = getBowlOf('pepper');
var pepper = pepperInABowl.get();
var slicedPepperInABowl = slice(pepper);
var tomatoInABowl = getBowlOf('tomato');
var tomato = tomatoInABowl.get();
var slicedTomatoInABowl = slice(tomato);
var slicedPepper = slicedPepperInABowl.get();
var slicedTomato = slicedTomatoInABowl.get();
var mixInABowl = mix(slicedPepper, slicedTomato);
35. var pepperInABowl = getBowlOf('pepper');
var pepper = pepperInABowl.get();
var slicedPepperInABowl = slice(pepper);
var tomatoInABowl = getBowlOf('tomato');
var tomato = tomatoInABowl.get();
var slicedTomatoInABowl = slice(tomato);
var slicedPepper = slicedPepperInABowl.get();
var slicedTomato = slicedTomatoInABowl.get();
var mixInABowl = mix(slicedPepper, slicedTomato);
37. var pepperInABowl = getBowlOf('pepper');
var pepper = pepperInABowl.get();
var slicedPepperInABowl = slice(pepper);
var tomatoInABowl = getBowlOf('tomato');
var tomato = tomatoInABowl.get();
var slicedTomatoInABowl = slice(tomato);
var slicedPepper = slicedPepperInABowl.get();
var slicedTomato = slicedTomatoInABowl.get();
var mixInABowl = mix(slicedPepper, slicedTomato);
41. var pepperInABowl = getBowlOf('pepper', 'red');
var pepper = pepperInABowl.get();
var slicedPepperInABowl = slice(pepper);
var tomatoInABowl = getBowlOf('tomato');
var tomato = tomatoInABowl.get();
var slicedTomatoInABowl = slice(tomato);
var slicedPepper = slicedPepperInABowl.get();
var slicedTomato = slicedTomatoInABowl.get();
var mixInABowl = mix(slicedPepper, slicedTomato);