An es6 js list monad, using generators