Rethinking JavaScript with Generator Functions