Nested iterators

Splatting…wasn’t something I knew was a thing until now. I figured there had to be something “opposite” to collect but I wasn’t sure what it was.

That solves it; both Iterators.product(fill([3,7], 3)...) and Iterators.product(collect(Iterators.repeated([3, 7], 3))...) do the thing I expect.

Thanks for teaching me something new today!

1 Like