I need to calculate a Cartesian product of two lists.
My list contains large number of elements, so nested foreach
is not a good idea in my case.
Anything else, that can be used there?
I need to calculate a Cartesian product of two lists.
My list contains large number of elements, so nested foreach
is not a good idea in my case.
Anything else, that can be used there?
You might be able to work on the values while it's being put together. It's hard to say without at least a snapshot of the structure you're working with. Here's a simple example.
The proc doesn't return a matrix it does work on points in the matrix.
output: