Fixes #180 (memory leak)

Fixes #180 by switching to a procedural implementation instead of
building up an entire promise chain of all the values yielded by the
generator.