Re: I need help understanding ".contains" method construction

2020-12-28 Thread ToddAndMargo via perl6-users
On 12/28/20 7:11 AM, Parrot Raiser wrote: "Definition of invoke transitive verb 1a : to petition for help or support b : to appeal to or cite as authority 2 : to call forth by incantation : conjure 3 : to make an earnest request for : solicit 4 :

Re: I need help understanding ".contains" method construction

2020-12-28 Thread Parrot Raiser
"Definition of invoke transitive verb 1a : to petition for help or support b : to appeal to or cite as authority 2 : to call forth by incantation : conjure 3 : to make an earnest request for : solicit 4 : to put into effect or operation : implement

Re: I need help understanding ".contains" method construction

2020-12-27 Thread ToddAndMargo via perl6-users
On 12/26/20 2:50 PM, Ralph Mellor wrote: Is this .self with a better name? No. I know you've been progressing in your understanding of OO in general, and Raku's in particular, since you wrote this email. So I won't explain it for now, but rather just try to confirm you now know what that bit

Re: I need help understanding ".contains" method construction

2020-12-27 Thread ToddAndMargo via perl6-users
On 12/19/20 11:04 PM, ToddAndMargo via perl6-users wrote: Hi All, https://github.com/rakudo/rakudo/blob/master/src/core.c/Str.pm6 337:multi method contains(Str:D: Str:D $needle --> Bool:D) { 338:nqp::hllbool(nqp::isne_i(nqp::index($!value,$needle,0),-1)) 339:} I "presume" in

Re: I need help understanding ".contains" method construction

2020-12-26 Thread Ralph Mellor
> >> What kind of variable is .value? > > > > I don't see a `.value`, only a `$!value`. > > Is this .self with a better name? No. I know you've been progressing in your understanding of OO in general, and Raku's in particular, since you wrote this email. So I won't explain it for now, but

Re: I need help understanding ".contains" method construction

2020-12-23 Thread Todd Chester via perl6-users
On 12/23/20 4:39 PM, Ralph Mellor wrote: 1) why is it "$needle" and not "$!needle" on line 338? Is this because it is an internal variable and not a variable from the class declaration? Got it It's a parameter from line 337. If that's what you mean by "an internal variable", then

Re: I need help understanding ".contains" method construction

2020-12-23 Thread Ralph Mellor
>1) why is it "$needle" and not "$!needle" on line 338? >Is this because it is an internal variable and not >a variable from the class declaration? It's a parameter from line 337. If that's what you mean by "an internal variable", then yes. :) >2) where is variable ".value" defined on