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

method vs multi method

Thread Next
From:
ToddAndMargo
Date:
September 14, 2018 22:44
Subject:
method vs multi method
Message ID:
ce8b9c20-925a-22e8-bf40-703276d59b04@zoho.com
Hi All,

In the following:
https://docs.perl6.org/routine/kv

     multi method kv(Any:U:  -->List)
     multi method kv(Any:D:  -->List)

Does the "multi" mean ther are moe than one way to
use the method, as in see the two instances above?
Or something else?

Also, it there was only one way to use the method,
would it be written:

     method kv(Any:  -->List)


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