Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: (Golf) Ordered Combinations

by satchboost (Scribe)
on Apr 25, 2001 at 01:55 UTC ( #75281=note: print w/replies, xml ) Need Help??


in reply to (Golf) Ordered Combinations

I know that I'm bending the rules a little, but this does get below 50.

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";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://75281]
help
Chatterbox?
[karlgoethebier]: No sack of rice fell over in China?
[karlgoethebier]: PM is going down...
[LanX]: ♪..♫ Don't cry for me Mandarina .......♩..♬
[karlgoethebier]: ...pasta bolded too soft in Eately?
[karlgoethebier]: BOILED!
[karlgoethebier]: OK, at least a cool song: https://www. youtube.com/watch? v=jU4caMqKssg

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2017-10-21 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (270 votes). Check out past polls.

    Notices?