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

Please explain this to me

Thread Next
From:
ToddAndMargo
Date:
September 11, 2018 10:10
Subject:
Please explain this to me
Message ID:
9af14020-2c72-dbca-7d64-ded92c72bfcf@zoho.com
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,
-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About