From: Andrew Wagner Date: 2010-09-14T23:11:24+09:00 Subject: Re: Iterate over a cartesian product. --00163649a0d97d3254049038c9b5 Content-Type: text/plain; charset=UTF-8 This thread seems to be a pretty thorough treatment of the idea: http://www.ruby-forum.com/topic/95519 . It was the first result of a google search on "ruby cross_product". On Tue, Sep 14, 2010 at 9:55 AM, Handy Gandy wrote: > I have an array of N arrays A_i: [A_1,A_2,...,A_N]. > > I want to iterate over the cartesian product A_1xA_2...xA_N. > > Is there a simple way of doing this without specifying N? > > --00163649a0d97d3254049038c9b5--