lazy-collections icon indicating copy to clipboard operation
lazy-collections copied to clipboard

Add `eager` utility

Open RobinMalfait opened this issue 5 years ago • 1 comments

RobinMalfait avatar Sep 19 '20 15:09 RobinMalfait

I like this direction @RobinMalfait ! The wait function is a great way to make intention clear in a program.

As described in the readme update, this eager() function processes batches of a fixed size, so I suggest actually calling it batch(), to clarify the grouped-processing behaviour. Does that make sense? Or would the batch name intuitively indicate some other collection-operation?

Then if we proceed to add more functions in this style, what I called eager() (in the draft in #4) could perhaps be named parallel() instead. That one would start processing a new next() as soon as any slot is free in the "buffer", not waiting for the full batch to complete. And then add race() too, if we want a variant that mess with collection order (that will be a challenge to write some solid tests for 😄).

bjuppa avatar Sep 22 '20 07:09 bjuppa

knock knock is this thing still on?

Welp, it took a while, but let's get this thing merged!

RobinMalfait avatar Aug 13 '22 17:08 RobinMalfait