Aaron Sherman wrote:

Ok, so log and log10:

        multi sub Math::Basic::log (: Num ?$x = $CALLER::_, Num +$base);
        &log10<> := &log<>.assuming:base(10);

What does log get in this case:

        for @x {

Does the curried log10 execute the defaulting for the sub it's based on
(and thus need run-time access to the default value, which I assume is
not in the signature) or does it leave defaulting up to log, in which
case, how does log find the right $_?

I had assumed that wrapper a curries function generates does not alter who the CALLER is. Therefore, when log10() is called, the CALLER for log() is the same as the CALLER for log10.

IMO, if this is not the case, it severely limits the utility of curried functions. Comments from @Larry requested.

-- Rod Adams

Reply via email to