An es6 js option monad, using generators