4 ms·If you are using a language with yield you can make this simpler (and more flexible) by using a generator.by wvenable 6y agoIf you are using a language with yield you can make this simpler (and more flexible) by using a generator.