by abirch · 1y ago · 0 comments
For me, this isn't intuitive. It works; however, it doesn't scream recursion to me.
def ints():
yield 1
yield from map(lambda x: x + 1, ints())
I preferred def ints():
cnt = 1
while True:
yield cnt
cnt += 1https://math.stackexchange.com/questions/505367/collection-o...