A es6 js maybe monad, using generators