in reply to Closest-value-in-list Golf!
Hey!,
I think it`s shorter, and I got no spaces...
But I don`t know how to count...
GreetZ!,
print "profeth still\n" if /bird|devil/;
I think it`s shorter, and I got no spaces...
But I don`t know how to count...
sub g{%_=map{abs($_[-1]-$_[$_]),$_}(0..@_-2);$_[$_{(sort{$a<=>$b}keys% +_)[0]}]}
GreetZ!,
- ChOas
print "profeth still\n" if /bird|devil/;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Closest-value-in-list Golf!
by larryk (Friar) on May 29, 2001 at 18:16 UTC |
In Section
Meditations