This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Description
@mattpodwysocki
I've always understood Enumerable.generate() to approximate for-loop style control flow. Is this wrong? Whereas the for-loop prints nothing, the generate example prints an undefined value to the console.
var arr = ["a", "b", "c"];
for(var i = 3; i < arr.length; ++i) {
console.log(arr[i]);
}
// prints nothing
var arr = ["a", "b", "c"];
Enumerable.generate(
3,
function(i) { return i < arr.length; },
function(i) { return i + 1; },
function(i) { return arr[i]; }
).forEach(console.log.bind(console));
// prints `undefined`