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

Re: Golf: Selection from sets (Choose)

by knobunc (Pilgrim)
on May 24, 2001 at 21:56 UTC ( #83029=note: print w/ replies, xml ) Need Help??

in reply to Golf: Selection from sets (Choose)

My best is 74 chars (including newlines and sub c{}:
sub c{f($_[0],$_[0]-$_[1]+1) / f($_[1],1)} sub f{eval join'*',$_[1]..$_[0]}

Take 2 (66 chars including both subs and newlines, 50 chars for just the sub bodies):
sub c{f($_[0]-$_[1]+1..$_[0])/f(1..$_[1])} sub f{eval join'*',@_}


Comment on Re: Golf: Selection from sets (Choose)
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://83029]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (15)
As of 2015-11-24 22:38 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (664 votes), past polls