in reply to Closest-value-in-list Golf!
to$h{shift@s}
. Don't get too complex, eh? UpdateTime's up!$h{$s[0]}
for a total of 70 chars.sub e {sub n{abs($s-$b)};$s=pop;while($b=pop){if(&n<$d||!$d){$l=$b;$d= +&n}}$l}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (boo) Re: Closest-value-in-list Golf!
by suaveant (Parson) on May 29, 2001 at 18:30 UTC | |
by larryk (Friar) on May 29, 2001 at 18:37 UTC | |
by suaveant (Parson) on May 29, 2001 at 18:45 UTC |