> One caveat of spreading iterables: JavaScript creates an array out of the elements of the iterable. That might be very wasteful for extremely large collections. For example, if we spread a large collection just to find an element in the collection, it might have been wiser to iterate over the element using its iterator directly.
> And if we have an infinite collection, spreading is going to fail outright.
http://raganwald.com/2015/02/17/lazy-iteratables-in-javascri...
It really depends on the logic written. You can solve the same thing in many different ways, the way chosen by the author doesn't seem to be a lazy one.
Not the language's fault. It's simply doing what is asked of it.
If they spread anyway, they could leave the generator away in the first place.