(Note: I handle the case of $n=0 correctly. The solution that you started with does not...)sub c { @r='';@r=map{$c=$_;map$c.$_,@r}@_ for 1..shift;@r }
In reply to Re (tilly) 1: (Golf) Ordered Combinations
by tilly
in thread (Golf) Ordered Combinations
by MeowChow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |