sub c{my$n=pop;--$n?map{my$c=$_;map$c.$_,c(@_,$n)}@_:@_}
Example:
print join " ", c qw(a b c 2); print "\n"; print join " ", c qw(0 1 4); print "\n";
In reply to Re: (Golf) Ordered Combinations
by satchboost
in thread (Golf) Ordered Combinations
by MeowChow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |