perl6/doc/lib/Method

doc src
(title) class Method
    class Method is Routine { }

 
A type for methods. To create a method, use the method keyword:
    my $m = method ($invocant: $param) {
        say "$invocant: '$param'";
    }
    "greeting".$m("hello");         # greeting: 'hello'

 

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: