Larry Wall:
> argument.  In fact, ??:: could be implemented as an infix:?? macro
> that does a special parse looking for a subsequent :: token.

...which gives us another built-in's implementation.

    macro infix:?? ($cond, $expr1, $expr2)
        is parsed(/:w (<Perl6.expr>) <'::'> (<Perl6.expr>)/) {
        return {
            if($cond) {
                $expr1;   #Last expression is the return value, right?
            }
            else {
                $expr2;
            }
        };
    }

Thanks, Larry!

--Brent Dax <[EMAIL PROTECTED]>
Perl and Parrot hacker

Reply via email to