I really like the gather macro, abstracting the idea of accumulating a list of results: https://stevelosh.com/blog/2018/05/fun-with-macros-gathering/ I often use `yield` for this in Python, but it gives both laziness and accumulation, so the reader has to work out which you wanted.