develooper Front page | perl.perl6.users | Postings from September 2018

Please explain this to me

Thread Next
September 11, 2018 10:10
Please explain this to me
Message ID:
multi method contains(Str:D: Cool:D $needle, Int(Cool:D) $pos)

Okay, I know that
    Str is a string
    Cool is an object that can be treated as both a string and a number
    $needle is the second optional parameter

What is "D"?

$needle is optional, why is it not stated as "$needle?"

How is both Str:D: and Cool:D the first parameter?

Why does "Str:D:" have a colon on the end and "Cool:D" does not?

What is Int(Cool:D) ?

What is $pos ?

Where is it stated that it has a return a value?

Where is it state that the return value is a boolean?

Yours in confusion,

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About