Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re (tilly) 2: (Golf) Per Mutations

by tilly (Archbishop)
on May 04, 2001 at 19:16 UTC ( #77981=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub permute{
    @r=[];$e=$_,@r=map{@a=@$_;map{@b=@a;splice(@b,$_,0,$e);[@b]}0..@a}@r f
    +or@_;@r
    }
    
  2. or download this
    sub permute{
    @r=[];$e=$_,@r=map{@a=@$_;map[@a[0..$_-1],$e,@a[$_..$#a]],0..@a}@r for
    +@_;@r
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://77981]
help
Chatterbox?
[Discipulus]: ♫ entre nubes de algodon ♫♪
[karlgoethebier]: ♪ ♫ ♬ Alles hat ein Ende nur die Wurst hat zwei ♪ ♫
[Discipulus]: mina's great voice

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2017-07-25 09:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (369 votes). Check out past polls.