On Tue, Sep 11, 2018 at 6:27 AM ToddAndMargo <toddandma...@zoho.com> wrote:
> method ($a: @b, %c) {}; # first argument is the invocant > I might say rather that $a is a parameter for the invocant. The @b parameter holds all the positional arguments, %c holds the named arguments. > class Foo { > method whoami($me:) { > "Well I'm class $me.^name(), of course!" > } > } > say Foo.whoami; # OUTPUT: «Well I'm class Foo, of course!» > > is no help whatsoever. > Since $me is in front of the ':' in the signature, it is saying you want a parameter to refer explicitly to the invocant. In "Foo.whoami", "Foo" is the invocant, the thing on which the method is executed. The signature asks for it to be passed in as "$me".