Make the last function also a generator, so that the explanation flows better