From: "Todd A. Jacobs" Date: 2010-06-04T01:04:48+09:00 Subject: Permutations that include sub-arrays in ruby? Ruby has a terrific implementation of single-valued permutations, but it doesn't yield the results I expected when using arrays of arrays. For example: [[1, 2], [2, 3]].permutation.to_a.include? [2, 1] => false The reason is that there's no permutation of the sub-arrays, just of the top-level array elements. Am I overlooking something obvious here? I'd like the permutations to include randomization within each sub-array, too. -- "Oh, look: rocks!" -- Doctor Who, "Destiny of the Daleks"