I have multiple arrays, lets say 4 for example:
a = ["a", "b", "c" ]
b = [1, 2, 3, 4]
c = ["xx", "yy"]
d = ["abc"]
I'd like to "progressively" do product of arrays in an iterative fashion, something like this
a.product(b)
a.product(b, c)
a.product(b, c, d)
I want to be able to do in a scalable fashion where the array count varies and get array product upto arr0.product(arr1, arr2, arr3.......arrn).Could someone please help figure out how to do this in Ruby.
Thanks in advance!