Abstacting the JS monad.