From: Adam Prescott Date: 2010-09-15T05:41:05+09:00 Subject: Re: Iterate over a cartesian product. ary.first is the first element of ary. ary.product(one, two, ...) is the cartesian product of ary with its arguments. ary.drop(1) is ary[1..-1], all the elements of ary but the first. ary.product(*ary.drop(1)) passes each element of ary[1..-1] to product() as an argument, making it equivalent to ary.product(ary[1], ary[2], ..., ary[-1]) > > That looks so cool I wish I knew what it does. > >