# File lib/facets/core/array/each_combo.rb, line 18 def each_combo a = collect{ |x| x.respond_to?(:to_a) ? x.to_a : 0..x } if a.size == 1 r = a.shift r.each{ |n| yield n } else r = a.shift r.each{ |n| a.each_combo{ |s| yield [n, *s] } } end end