How do you declare attribute functions? Specifically, I was thinking
about map and what kind of object it would return, and I stumbled on a
confusing point:

        class mapper does iterator {
                has &.transform;
                ...
        }

Ok, that's fine, but what kind of accessor does it get?

        my mapper $x .= new(transform => ->{(1,2,3)});
        $x.transform()

would imply that you're calling method transform, not invoking the
accessor function which does not have a method signature. Would you have
to do this:

        class mapper does iterator {
                has Code $transform;
                ...
        }
        ...
        $x.transform.();

?

-- 
â 781-324-3772
â [EMAIL PROTECTED]
â http://www.ajs.com/~ajs

Reply via email to