Saleh Abdel Motaal
Jun 8, 2018 · 1 min read

Generators are surely under appreciated. It seems that either people don’t find a resumable sync function a useful thing, and maybe even the poor performance when Generators were still a fresh concept did not help.

The only slightly more efficient alternative to endlessly repeating arrays is a `Reiterator { [Symbol.iterator]() { … } }` which is about 200% the code and usually less than 1.5x the speed in all my recent tests.