Rakudo Perl Hacking Rakudo Perl #83

Setting

Not all builtins can be easily written in Perl 6

Some setting items may use "inline PIR" to efficiently compute values:

our Int multi method floor() is export {
    Q:PIR {
        $N0 = self
        $I0 = floor $N0
        %r = box $I0
    }
}

our Str multi method lc is export {
    Q:PIR {
        $S0 = self
        downcase $S0
        %r = box $S0
    }
}
Copyright © 2009
http://www.pmichaud.com/2009/pres/