Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Closest-value-in-list Golf!

by ChOas (Curate)
on May 29, 2001 at 18:46 UTC ( #83955=note: print w/replies, xml ) Need Help??


in reply to Closest-value-in-list Golf!

55 ... and now I give up....

sub g{%_=map{abs$_[-1]-$_,$_}@_;$_{(sort{$a<=>$b}keys%_)[1]}}

GreetZ!,
    ChOas

print "profeth still\n" if /bird|devil/;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://83955]
help
Chatterbox?
[erix]: that's really impossible with bigint
[erix]: and the site is still only 'hopefully' active :)
[erix]: but fair enough, he may think he solves a problem

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2017-06-23 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (551 votes). Check out past polls.