In order to compute the cartesian product in Ruby, one can use Array#product, how is the syntax if I have an array of arrays and want to compute the product?
[[1,2],[3,4],[5,6]] => [[1,3,5], [2,3,5], ...]
I am not sure, because in the Ruby documentation the product method is defined with an arbitrary number of arguments, so simply passing my arrays of arrays as an argument, like that:
[].product(as) => [
does not suffice. How can I solve this?