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

Can methods have multiple inputs?

Thread Next
From:
ToddAndMargo
Date:
September 14, 2018 22:47
Subject:
Can methods have multiple inputs?
Message ID:
ca34f710-ef91-0f00-cb03-6a728d39d34c@zoho.com
Hi All,

Can a method be given multiple inputs?

     ( $a, $b ).foo

and how would the docs write it?

     method foo(Any:D Any:D:  -->Bool)

Is there a comma or a space between the two "any"'s?

Many thanks,
-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