Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re (tilly) 1: Golf: Selection from sets (Choose)

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


in reply to Re: Golf: Selection from sets (Choose)
in thread Golf: Selection from sets (Choose)

It is usual when counting helper subroutines to count the declaration of the helper in the overall length. So your code is of length 60.

Incidentally here is another reasonably efficient one to compute of length 53. Mainly interesting because it works on a different principle.

sub c{ my@c=1;map$c[$_]+=$c[$_-1],1..$_[1]for 1..$_[0];pop@c }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://83184]
help
Chatterbox?
[LanX]: < & > I agree
[marto]: oh you guys...
[robby_dobby]: LanX: Calling the mayor of London, a transport commissar sounds about right. He seems especially fond of talking about "TfL" aka "Transport for London"

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2017-12-15 18:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (442 votes). Check out past polls.

    Notices?