Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re (tilly) 2 (non-recursive): (Golf as well): List of Partitions

by tilly (Archbishop)
on May 06, 2001 at 20:39 UTC ( #78364=note: print w/replies, xml ) Need Help??


in reply to Re: (Golf as well): List of Partitions
in thread (Golf as well): List of Partitions

The first is a non-solution in my books, but the second is very good. But I was wondering if it was possible to do a reasonable non-recursive solution, and at 87 by my count, 94 counting the body, it seems like the best so far.
sub P{ $n=pop;@a=[0];map{$i=$_;push@{$a[$i+$_]},map[$i,@$_],@{$a[$_]}for 0..$n}1..$n;@{$a[$n]} }
I keep on thinking this should be improvable, but darned if I can see it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://78364]
help
Chatterbox?
[thezip]: Deployment checklist?
[Corion]: thezip: Yeah - we have "CAP", but that means "Change Ablauf Plan" (Change Sequence Plan). Likely there is a true ITIL name for this too.
[Corion]: While I'm not really a fan of ITIL, it certainly is better than nothing and it at least provides a common vocabulary, so if you have ITIL somewhere at your disposal, it might be worth a look

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2017-02-23 17:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (350 votes). Check out past polls.