in reply to (Golf) Nearest Neighbors
sub nn { my($p,@l)=sort{$a<=>$b}@_;@{(sort{$$a[0]<=>$$b[0]}map[$_-$p,$p+0,$p= +$_],@l)[0]}[1,2] }
MeowChow s aamecha.s a..a\u$&owag.print
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: (Golf) Nearest Neighbors
by thospel (Hermit) on Oct 27, 2003 at 19:28 UTC | |
by thospel (Hermit) on Oct 27, 2003 at 19:34 UTC |