On Thursday, July 31, 2003, at 12:05 PM, Luke Palmer wrote:
Well, I don't think it's possible, actually.  There's a flattening
list context at the beginning (implying a sugary drink from 7 eleven),
followed by a code block.  But, as we know, slurpy arrays can only
come at the end of positional parameters.

Right, which is why I couldn't get my head around it. But EX6 says:


"an important goal of Perl 6 is to make the language powerful enough to natively implement all its own built-ins"

Does "built-ins" just mean "subs" like split(), or does it also include control structures like if() and for()?

But, assuming that is possible, here's C<for> in its entirety:

    sub for ([EMAIL PROTECTED], &block) {
        while @list {
            block( [EMAIL PROTECTED](0, &block.arity) );
        }
    }

Maybe for() does some magic with "is parsed" and the various Perl 6 grammar rule regexes?


-John



Reply via email to