Generator functions are one of my favorite syntax in JS and make a room for performance improvements through lazy evaluations. But it seems like it's not supported in paperscript, yet. For example,
function* idMaker() {
var index = 0;
while (index < 3)
yield index++;
}
this simple code cannot be interpreted in paperscript.
About function generators