Thanks for your comment! While this code is lazy, it's still completely synchronous. So once take is called, it has to run to completion - calling next only processes one item, but I think you meant to say take. I wonder if you mean that this code could be implemented asynchronously. I did implement a simple asynchronous reduce for another article:
Thanks for your comment! While this code is lazy, it's still completely synchronous. So once
take
is called, it has to run to completion - callingnext
only processes one item, but I think you meant to saytake
. I wonder if you mean that this code could be implemented asynchronously. I did implement a simple asynchronous reduce for another article: