def cross_products(c)
      c.to_a.group_by{ |_, v| v.sort }.map{ |k,v| [ v.map{ |a| a[0] }.sort, k ] }
    end
def cross_products(c)
      c.to_a.group_by{ |_, v| v.sort }.map{ |k,v| [ v.map{ |a| a[0] }.sort, k ] }
    end
discover cross products -- e.g., {this, that} X {cat, dog}