> > It also reminds me of mjd's mention of:  my($first) = sort {...} @list;
> > being O(n) if Perl were really Lazy.
> 
> But it would need a completely different algorithm.  Which is not too
> bad.  And even
> 
>     my ($first, $second, $third) = sort {...} @list;
> 
> is kind-of plausible.  So we'd definitely want ...

        my @heapa is heap;
        @heapa = @list;
        my $first = shift @heapa;
        my $second = shift @heapa;
        my $third = shift @heapa;




-- 
                      David Nicol 816.235.1187 [EMAIL PROTECTED]
                                              Parse, munge, repeat.

Reply via email to