my @set = qw(A B C); my $output = mk_tuples(@set, 2);