Well, definitely very cool, but: the Haskell code is delightfully readable while the Python code takes effort for me to read. This is not meant as a criticism, this article is a neat thought experiment.
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...