On 09/11/2018 03:30 AM, JJ Merelo wrote:
Also, "is no help whatsoever" is no help whatsoever. Saying what part of
it is not clear enough, or could be explained better, is.
Well now,
> method ($a: @b, %c) {}; # first argument is the invocant
1) why is it a "method" and not a "function"?
1-1/2) why is there a color after a$? What happens to $a?
2) What is an "invocant"? Does it mean I can access it
by placing it after something with a dot? Sort of
like
contains("abc", "b")
"abc".contians("b")
3) What makes the "invocant" special over the other second
and third parameters?
> class Foo {
4) I see no class called "Foo" over on
https://docs.perl6.org/type.html
5) Are they creating a new class? If so, why?
> method whoami($me:) {
6) where is @b and %c?
> "Well I'm class $me.^name(), of course!"
7) why is there a caret in front of "name"?
> }
> }
>
>
> say Foo.whoami; # OUTPUT: «Well I'm class Foo, of course!»
8) no clue how they got there
JJ, have you ever used Perl 5's perldocs? They are a bazillion
times easier to understand than Perl 6's.
Thank you for the help with this?
-T