Larry Wall wrote:
On Wed, Nov 23, 2005 at 06:21:56PM +0100, Juerd wrote:
: Larry Wall skribis 2005-11-23  9:19 (-0800):
: >     ^5.each { say }
: : Without colon?


Yeah, that one doesn't work a couple of way.  Unfortunately .each still
binds tighter than ^ too.  So it'd have to be:

    (^5).each: { say }

unless we made an infix:<each> operator of looser precedence:

    ^5 each { say }

Or we don't have infix:<do>, so maybe

    ^5 do { say }

Well, or we go back to ^ beeing the kind sigil that, like $5 retrieves
matched data, captures some countably 5 numbers singly stepping
to result in the lazy list (0,1,2,3,4) with five elements
as ordered. I would call that 'five out of void' :)

Note that ^5[-1] obviously is 4. And also ^5[-5] == 0. Welcome to the
heart of cardinal numbers. Or was that a card attack? Perhaps we call
that idiom a cardiogram? Or cardiarray? Might sound funny, but is
running very deep! To the heart of Perl6 arrays, actually.
--

Reply via email to