Is the third argument really needed (would checking for generation being a "Function" be enough)?
Perhaps we should be checking applyFunc (generator) only once, instead of every time.