Never miss a beat

Join my newsletter.

Tag: generators

JavaScript: Generators

Published: 7/19/2016

One thing I’ve learned recently from Clojure (don’t worry, this post is about JavaScript) is that laziness is great. Lazy code is powerful code, allowing you to model things like infinite sequences or complex computations over a range of data. Without this laziness, an infinite sequence would cause a stack overflow or complex computations would bog down your performance when you may not even need to perform all those computations to begin with! Enter Generators With the latest rendition of…