HaloO,
John M. Dlugosz wrote:
Perhaps the supplier of the CPAN module for the nth function could
also include, besides the actual function, an optimization pattern
plug-in that locates the idiom in the parse tree and replaces the
expression with a call to nth.
Wouldn't a dispatch target
On Mon, Sep 01, 2008 at 05:52:28PM +0200, TSa wrote:
HaloO,
John M. Dlugosz wrote:
Perhaps the supplier of the CPAN module for the nth function could
also include, besides the actual function, an optimization pattern
plug-in that locates the idiom in the parse tree and replaces the
On 2008 Sep 1, at 15:20, Larry Wall wrote:
On Mon, Sep 01, 2008 at 05:52:28PM +0200, TSa wrote:
John M. Dlugosz wrote:
Perhaps the supplier of the CPAN module for the nth function could
also include, besides the actual function, an optimization pattern
plug-in that locates the idiom in the
On Mon, Sep 01, 2008 at 03:40:39PM -0400, Brandon S. Allbery KF8NH wrote:
On 2008 Sep 1, at 15:20, Larry Wall wrote:
On Mon, Sep 01, 2008 at 05:52:28PM +0200, TSa wrote:
John M. Dlugosz wrote:
Perhaps the supplier of the CPAN module for the nth function could
also include, besides the actual
On Sat, Aug 30, 2008 at 4:22 AM, Dave Whipp [EMAIL PROTECTED] wrote:
Lets say I want to find the 5th smallest element in an array. I might
write:
@array.sort.[4];
How does the implementation of the sort function know that I just want to
5th item (and thus choose an appropriate
On Aug 30, 8:47 am, [EMAIL PROTECTED] (John M. Dlugosz) wrote:
Have the sort function simply return a lazy list object. When the [4]
is called on that object, it knows to do as much work as needed, and can
leave the rest as lazy.
That may be half the answer, but simply making the decision
dpuu dave-at-whipp.name |Perl 6| wrote:
On Aug 30, 8:47 am, [EMAIL PROTECTED] (John M. Dlugosz) wrote:
Have the sort function simply return a lazy list object. When the [4]
is called on that object, it knows to do as much work as needed, and can
leave the rest as lazy.
That may be
Have the sort function simply return a lazy list object. When the [4]
is called on that object, it knows to do as much work as needed, and can
leave the rest as lazy.
--John
Dave Whipp dave-at-whipp.name |Perl 6| wrote:
Lets say I want to find the 5th smallest element in an array. I might
Lets say I want to find the 5th smallest element in an array. I might write:
@array.sort.[4];
How does the implementation of the sort function know that I just want
to 5th item (and thus choose an appropriate optimization)? Obviously the
function could be told that it's caller wants 5