RE: Re: [COLLECTIONS] CartesianProductIterator

2024-07-04 Thread Oleksii Pelykh
Absolutely true that same functionality can be achieved with a nested for-loop or a flatMap, however for a 10+ nesting levels - or dynamic number/order of nesting levels - it becomes hardly manageable. On 2024/06/26 21:02:53 Peter Burka wrote: > I don't know if it's been proposed before, but I t

Re: [COLLECTIONS] CartesianProductIterator

2024-06-26 Thread Peter Burka
I don't know if it's been proposed before, but I think any implementation would necessarily be inefficient. I imagine such an iterator would need to produce objects of type Pair. This would lead to a lot of allocation and could create garbage collection pressure. The same functionality can be achie

[COLLECTIONS] CartesianProductIterator

2024-06-26 Thread Alexey Pelykh
G'day to all! It seems there's no Iterator that would implement the same thing as Python's itertools.product (quite literally a nested for loop) with some Java stream() capabilities. Is this intentional (as in, was considered and rejected) or a PR with such CartesianProductIterator would be wel