Closed rlindsgaard closed 10 years ago
Implement a generator that invoked with () consecutively yields new results based on the old one. See https://groups.google.com/forum/#!topic/rndphrase/51__1Sc8Eso for details or
function init(i) { var j = 0; var generator = function() { j = i+j; return j; } return generator } var f = init(2); for(var i=0; i < 10; i++) { console.log(f()) }
I am not completely satisfied with this solution. Ideas are welcome
https://github.com/RndPhrase/RndPhrase.js/pull/12 is much more nice
Now we can close it
Implement a generator that invoked with () consecutively yields new results based on the old one. See https://groups.google.com/forum/#!topic/rndphrase/51__1Sc8Eso for details or