Javascript Monads